OK, you have polylines with Z enabled, yet Z has no value assigned yet.
What I would do in this case is create a tmp point featureclass with the vertices of the polygons and information on original OID of the polyline, part number and point number (to be able to link the vertice after Z has been defined back to same vertice in the polyline). Next, assuming you have spatial analyst available, is use the tool extract values to points to extract the Z value for each point into a new tmp featureclass (you could do this using the IN_MEM workspace, but it depends on the amount of points, if this will work in memory).
The next step would be to create a search cursor and fill a dictionary from the points with the Z values as attribute (use OriginalOID_PartNumber_PointNumber as key and the Z as value) and use this when you create the update cursor to update the Z value if the individual vertices.
You can find detailed information on working with 3D geometries in arcpy in my blog post here: Working with 3D and M-aware geometries in Arcpy