Changes term in Search.toQuery to be skipped over if it's null.