Handle the case when params[:search] = nil gracefully.