Geomtries have getTypeName which really only returns a flat set of names (previously these were enums). Once you subclass something like a TetrahedralMesh and give it a different name/type now anything that uses that name (such as a DynamicalModel that checks if you gave it a "TetrahedralMesh") would fail. dynamic_cast should be preferred here.
Note: Static assertions are also possible which would actually prevent the program from even compiling if you gave it a non valid geometry. But this is not a template library and you can't export such things.