You can also safely check with Vicious mockery. The spell can target any creature, but only damages the target if it can hear, which “inanimate” things cannot.
On the other hand, Dissonant Whispers causes the target to hear (rather than hearing being a precondition as it is with Vicious Mockery) and with this you can kill petrified creatures, thus ensuring no spell casters return them to flesh-and-blood, without damaging the statue.
Hope you brought your diamond dust!