Yes, but core query can never be nil (it's defined a little further down and always returns a hash).