The only strictly complete way to check for animation is to go through each frame and check each vertex position. However, if you're comfortable guessing that the animation will be keyed on a particular channel, doing a listConnections and looking for animCurve nodes of various types will be the simplest way.