I can't write this comment far enough below, but turn `hasQuery: req.param( "q" ),` into `hasQuery: !!req.param( "q" ),`