diff --git a/core/modules/user/src/UserInterface.php b/core/modules/user/src/UserInterface.php
index bbbacff52311a9e8770ab354b5161333e59c59cf..51c7601a7923f86a82a698bfc6d1d2443472bfcb 100644
--- a/core/modules/user/src/UserInterface.php
+++ b/core/modules/user/src/UserInterface.php
@@ -98,8 +98,8 @@ public function setUsername($username);
   /**
    * Returns the hashed password.
    *
-   * @return string
-   *   The hashed password.
+   * @return string|null
+   *   The hashed password, or NULL if a password is not set.
    */
   public function getPassword();