Check if the query results exists