Error checking for "all" query