Improving _paramsForHandler logic for handling query strings.