diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 61fe56032a310408696aafd1463eaf1eae5f744d..6e7d080ecc3f047c24789ed1ff98284d7d2e24d7 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -615,4 +615,7 @@ class AuthHandler(BaseHandler):
         Returns:
             Whether self.hash(password) == stored_hash (bool).
         """
-        return bcrypt.hashpw(password, stored_hash) == stored_hash
+        if stored_hash:
+            return bcrypt.hashpw(password, stored_hash) == stored_hash
+        else:
+            return False