Fix null reference check logic when unlocking a password.
Merge pull request #594 from nimore/UnlockPasswordFix

Fix null reference check logic when unlocking a password.