public default Collection convertArgumentToCollection(final Object arg) {
        if (null == arg) {
            throw new IllegalArgumentException(
                    String.format("Argument provided for %s step can't be null.", getStepName()));
        }

        final Collection incoming = asCollection(arg);

        if (null == incoming) {
            throw new IllegalArgumentException(
                    String.format(
                            "%s step can only take an array or an Iterable as an argument, encountered %s",
                            getStepName(),
                            arg.getClass()));
        }

        return incoming;
    }
Template method used for retrieving the implementing Step's name.

@return this step's name.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ListFunction.java