Check for existence of req.query. Closes GH-459