public default boolean isRoot() {
            return getParent() instanceof EmptyStep;
        }
Determines if the traversal is at the root level.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java