public boolean hasFilter() {
        return this.vertexFilter != null || this.edgeFilter != null || this.vertexPropertyFilter != null;
    }
Whether filters have been defined.

@return true if either a vertex, edge filter, or vertex property filter has been provided.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphFilter.java