Those are actually quite distinct concerns (that may or may not be related depending on your specific cases):
Use the Python function type()
to determine explicitly which RhinoCommon geometry type it is.
A closed cylinder/would be a Brep, not any of the surface types. Have a look at this old post by David that explains the different types and how they relate.
You can check if a surface is closed using IsClosed, and if a brep is closed/solid using IsSolid.
I’m not sure how that might help, but again probably depends on exactly what it is you’re trying to determine. Anywho, hope this at least helped point in the right direction.
Edit: Sorry think I misunderstood, you probably meant a single surface cone/cylinder that is not capped. Surface.IsClosed
should do the trick then. Always good to provide example files.