making sure that params[:search] is actually a thing before doing stuff with it