Added a check for potentially-null keystore passwords.