Test for empty words in `query`