Handle case when params[:order] is nil.