This method of the WildcardExpression Class determines if the expression has an expression compiled into it. An empty expression cannot be used for matching.
public boolean isEmpty();
Returns true if the expression does not contain a compiled expression; otherwise, returns false.