The problem is that Element.Geometry returns a list. Just use an If statement with CurveElement.Curve instead of Element.Geometry.

The problem is that Element.Geometry returns a list. Just use an If statement with CurveElement.Curve instead of Element.Geometry.
