Tidy setMapType/getMapType handling; throwing an exception if an invalid map type is passed.