Fix query_params for valueless params

Before was raising error: 'NoMethodError: undefined method `tr' for nil:NilClass'

@davidann @greykn @myronmarston