Update type.rb

Fixed issue #288: Missing cast method for LatLon type