Cannot Calculate Geometry from Spatial Elements (Rooms)

Hi there!
I’m having trouble with some basic functions using the Revit API
Does anyone know why Is the Function CanCalculateGeometry not working with my code?
I have several Rooms created in the model but I’m getting this warning when trying to apply the method CanCalculateGeometry(room).
“No method matches given arguments for CanCalculateGeometry”
Aren’t rooms SpatialElements inside Revit?

Any help will be very appreciated.