Check that we have a Query
Style fixes