private boolean isStringTestable() {
        if (this.key != null && this.key.equals(T.id.getAccessor())) {
            final Object predicateValue = null == this.predicate ? null : this.predicate.getValue();
            if (predicateValue instanceof Collection) {
                final Collection collection = (Collection) predicateValue;
                if (!collection.isEmpty()) {
                    return ((Collection) predicateValue).stream().allMatch(c -> null == c || GValue.instanceOf(c, GType.STRING));
                }
            }

            return GValue.instanceOf(predicateValue, GType.STRING);
        }

        return false;
    }
Determines if the value of the predicate is testable via {@code toString()} representation of an element which
is only relevant if the has relates to an {@link T#id}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java