added validator to check if a selectAll query is present