private static <S> Object resolve(final Object object, final Traverser.Admin<S> traverser) {
        if (object instanceof Traversal.Admin) {
            return TraversalUtil.apply(traverser, (Traversal.Admin<S, ?>) object);
        } else {
            return GValue.valueOf(object);
        }
    }
Takes an object and tests if it is a {@link GValue} or a {@link Traversal} and if so, resolves it to its value
otherwise it just returns itself.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java