public static boolean valueInstanceOfCollection(final Object o) {
        return o instanceof GValue && ((GValue) o).getType().isCollection();
    }
Tests if the object is a {@link GValue} and if so, checks if the type of the value is a collection.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/GValue.java