private boolean containsValidByPass(final ValueTraversal vt) {
        if (null == vt.getBypassTraversal()) return false;
        if (!(vt.getStartStep() instanceof CoalesceStep)) return false;
        final CoalesceStep coalesceStep = (CoalesceStep) vt.getStartStep();
        final List<Traversal> children = coalesceStep.getLocalChildren();
        final Traversal lastChild = children.get(children.size() - 1);
        return lastChild == nullTraversal ||
                (lastChild instanceof ConstantTraversal && ((ConstantTraversal) lastChild).next() == null) ||
                (lastChild.asAdmin().getEndStep() instanceof ConstantStep && ((ConstantStep) lastChild.asAdmin().getEndStep()).getConstant() == null);
    }
Validate that the {@link ValueTraversal} needs to be wrapped. It can be skipped if a bypass is already in place
or if there isn't a {@link CoalesceStep} at the start or if there isn't a {@code null} in the
{@link CoalesceStep}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/ProductiveByStrategy.java