I usually end up doing something like this:
if params.has_key?(:search) && params[:search].has_key?(:tags_name_in)
...
end
Although if you don't mind testing against nils in your if statement you could also do this:
if params[:search] && params[:search][:tags_name_in] ...
This will not throw an error because ruby short-circuits the && operator.