May be am getting this wrong, do you mean the parameter value for oldPassword passed in to the method being null? If yes, then it is fine