Simplified check when pushing to the queries array