docs: public static void collectionOf(FeatureCollection featureCollection, String type, String name) {
      if (name == null || name.length() == 0) {
        throw new TurfException("collectionOf() requires a name");
      }
      if (featureCollection == null || !featureCollection.type().equals("FeatureCollection")
        || featureCollection.features() == null) {
        throw new TurfException(String.format(
          "Invalid input to %s, FeatureCollection required", name));
      }
      for (Feature feature : featureCollection.features()) {
        if (feature == null || !feature.type().equals("Feature") || feature.geometry() == null) {
          throw new TurfException(String.format(
            "Invalid input to %s, Feature with geometry required", name));
        }
        if (feature.geometry() == null || !feature.geometry().type().equals(type)) {
          throw new TurfException(String.format(
            "Invalid input to %s: must be a %s, given %s", name, type, feature.geometry().type()));
        }
      }
    }