Fixed #20675 -- `check_password` should work when no password is specified.

The regression was introduced by 2c4fe761a. refs #20593.