add additional judgment for 1st arg of off method.