Switch to a good ol' conditional instead of compact

request.query_parameters returns an empty string, so compact will not suffice here.