Add more checks to the query object