You call this method `params_with_string?` but you're checking that the first argument is not a hash. Would it be better to check for:

~~~
params[0].is_a?(String)
~~~