On the nonlinear Schrödinger equation for waves on a nonuniform current