@Override
        public boolean visit(Item item) {
            if (item instanceof NullItem) {
                throw new IllegalArgumentException("Got NullItem inside nonEmpty().");
            } else if (item instanceof WordItem) {
                if (((WordItem) item).getIndexedString().isEmpty()) {
                    throw new IllegalArgumentException("Searching for empty string inside nonEmpty()");
                }
            } else if (item instanceof CompositeItem) {
                if (((CompositeItem) item).getItemCount() == 0) {
                    throw new IllegalArgumentException("Empty composite operator (" + item.getName() + ") inside nonEmpty()");
                }
            }
            return true;
        }
The YQL query language.

This class <em>must</em> be kept in lockstep with {@link VespaSerializer}.
Adding anything here will usually require a corresponding addition in
VespaSerializer.

@author Steinar Knutsen
@author Stian Kristoffersen
@author Simon Thoresen Hult
container-search/src/main/java/com/yahoo/search/yql/YqlParser.java