code: public static void geojsonType(GeoJson value, String type, String name) {
      if (type == null || type.length() == 0 || name == null || name.length() == 0) {
        throw new TurfException("Type and name required");
      }
      if (value == null || !value.type().equals(type)) {
        throw new TurfException("Invalid input to " + name + ": must be a " + type
          + ", given " + (value != null ? value.type() : " null"));
      }
    }
docs: Enforce expectations about types of GeoJson objects for Turf.
  
  @param value any GeoJson object
  @param type  expected GeoJson type
  @param name  name of calling function
  @see <a href="http://turfjs.org/docs/#geojsontype">Turf geojsonType documentation</a>
  @since 1.2.0