code: function convert(json) {
  		var wkt = '', coordinates;
  
  		if (!json) throw new Error('Not able to parse Geometry. No argument or null passed.');
  
  		// check if JSON is passed as String and convert to object
  		if (typeof json === 'string') {
  			try {
  				json = JSON.parse(json);
  			} catch (e) {
  				throw new Error('Not able to parse Geometry. Invalid String.');
  			}
  		} else if (typeof json !== 'object') {
  			throw new Error('Not able to parse Geometry. Invalid data type.');
  		}
  
  		if (!json.coordinates) throw new Error('Not able to parse geometry. Property geometry not set.');
  
  		switch (json.type) {
  			case 'Point':
  				wkt = parsePointGeometry(json.coordinates);
  				break;
  			case 'MultiPoint':
  				wkt = parseMultiPointGeometry(json.coordinates);
  				break;
  			case 'LineString':
  				wkt = parseLineGeometry(json.coordinates);
  				break;
  			case 'MultiLineString':
  				wkt = parseMultiLineGeometry(json.coordinates);
  				break;
  			case 'Polygon':
  				wkt = parsePolygonGeometry(json.coordinates);
  				break;
  			case 'MultiPolygon':
  				wkt = parseMultiPolygonGeometry(json.coordinates);
  				break;
  			default:
  				throw new Error('Not able to parse geometry. Property type not set.');
  		}
  		return [json.type.toUpperCase(), '(', wkt, ')'].join('');
  	}
docs: /*
  Returns string WKT represenation of the GeoJSON geometry passed to the method.
  
  @param json {string|object} The GeoJSON gemetry to be parsed.