presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/EncodedPolylineFunctions.java/EncodedPolylineFunctions/validateType
class EncodedPolylineFunctions:    private static void validateType(String function, OGCGeometry geometry, Set<GeometryType> validTypes)
    {
        GeometryType type = GeometryType.getForEsriGeometryType(geometry.geometryType());
        if (!validTypes.contains(type)) {
            throw new PrestoException(INVALID_FUNCTION_ARGUMENT, format("%s only applies to %s. Input type is: %s", function, Joiner.on(" or ").join(validTypes), type));
        }
    }