Explode Polycurve

after exploding a polycurve:

Curve[ ] segments = polycurve.DuplicateSegments();

I want to:
-test if the segment is a line (I can do that: segment.IsLinear() )
-test if the segment is an arc (I can do that too: segment.TryGetArc(out arc) )
-test if the segment is a nurbs curve (but not an arc nor a line) to decompose it with the method Curve.ToPolyline, each segment from this polyline will be treated as a line. Here, I can’t find the trick to do it…
Help me please

Have you tried isinstance(your_curve_segment, Rhino.Geometry.NurbsCurve)?

See that

For SVG plugin I have done that

public XmlNode WriteSVGCurve(XmlDocument xmlDoc, Curve curve, Rhino.DocObjects.RhinoObject rhobj)
        {
            //if (testIfCurveVisibleInView(curve, DirectionOfProjection, doc.ModelAngleToleranceRadians, doc.ModelAbsoluteTolerance))
            //{
            if (curve.IsLinear())
            {
                return WriteSVGLine(xmlDoc, curve, rhobj);
            }//End if linear
            else
            {
                Polyline polyline;
                if (curve.TryGetPolyline(out polyline))
                {
                    return WriteSVGPolyline(xmlDoc, polyline, rhobj);
                }//End if polyline
                else
                {
                    Circle circle;
                    if (curve.TryGetCircle(out circle))
                    {
                        if (Vector3d.Multiply(circle.Normal, DirectionOfProjection) < 0.9999) return WriteSVGBezier(xmlDoc, curve, rhobj);
                        else return WriteSVGCircle(xmlDoc, circle, rhobj);
                    }
                    else
                    {
                        return WriteSVGBezier(xmlDoc, curve, rhobj);
                    }
                }
            }
            //}
            //else return null;
        }

Thank you very much for your answers, I will come back to you when I can do the tests.