In map#<< remove MapWKT::Geometry from as a condition from the case statement because MapWKT::Geometry have a wkt method that will work in the else statement.
Removed commented out code.