Deal with null returns with query

@jsteiner @gabebw
So fresh and so clean!