When used with a polyline shp containing null geometry, ExportToWkt generates polyline with one point.
"LINESTRING (667658.63468023448 6677741.3333493974)"
I suggest to return an empty string.