code: function validateGeoJson(geoJson) {
    if (!geoJson)
      throw new Error('No geojson passed');
  
    if (geoJson.type !== 'FeatureCollection' &&
      geoJson.type !== 'GeometryCollection' &&
      geoJson.type !== 'MultiLineString' &&
      geoJson.type !== 'LineString' &&
      geoJson.type !== 'Feature'
    )
      throw new Error(`Invalid input type '${geoJson.type}'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature`);
  }
docs: Validates the geoJson.
  
  @param {Geojson} geoJson - input geoJson.
  @throws {Error} if geoJson is invalid.