Ensure queries is not empty