making sure query isn't null