Spray foam offers no food value and is extremely dense. While it is possible that a rodent or insect could chew through it, it is very unlikely and far less suitable for them when compared to traditional fiberglass insulation.