handle edge cases in query-params

This handles query params like "https://foo.com/?label" and "?label=" They're not well-defined in the spec, but they do appear to happen in the wild.