public int getLevel() {
        if (level == null) {
            throw new IllegalStateException("Level for expression '" + this + "' has not been resolved.");
        }
        return level;
    }
Returns the conceptual level of this expression.

@return the level.
@throws IllegalArgumentException thrown if the level of this expression has not been resolved.
@see #resolveLevel(int)
container-search/src/main/java/com/yahoo/search/grouping/request/GroupingExpression.java