export point clouds to wrl

Hi,I need to write e blender plugin that exports objects in VRML2 from .ply. The problem is that my objects can be either meshes, either point clouds. Exporting meshes works with the already existing plugin, but it does not correctly export point clouds: creates IndexedFaceSet in stead of PointSet node, adds some extra fields which don’t apply to PointSet, etc. So I have 2 questions:How can I check automatically if I have a mesh or a point cloud? This is part of a bigger web service and I need to check via the code, not by ticking a box.How do I get the color of each point? The data is not in the same place as the color information for meshes.Thanks