Identify if a solid is a mesh body

Is it possible to identify a mesh body within a macro?

I have a macro to export parts in various formats, and want to automatically change output from Step to STL for mesh bodies.

SolidworksApi/macros