function geojsonType(value, type, name) {
    if (!type || !name) {
        throw new Error("type and name required");
    }
    if (!value || value.type !== type) {
        throw new Error("Invalid input to " +
            name +
            ": must be a " +
            type +
            ", given " +
            value.type);
    }
}
Enforce expectations about types of GeoJSON objects for Turf.

@name geojsonType
@param {GeoJSON} value any GeoJSON object
@param {string} type expected GeoJSON type
@param {string} name name of calling function
@throws {Error} if value is not the expected type.