check for length of set of matched elements rather than the empty set.