While I don't believe the NVL functions are causing the error that you are receiving, the code (as written) doesn't make much sense.
'NVL(p_passwd1,NULL)' translates to "If the value of p_passwd1 is NULL, use the value NULL".
Since this code does not provide any real function, I suspect what you really meant was:

( NVL(p_passwd1,'NULL') <> NVL(p_passwd2,'NULL')).

However, since you have not followed up on this issue, I also assume you've worked it out.