diff --git a/Sources/Integration/Session/Session.swift b/Sources/Integration/Session/Session.swift
index fee3c76c0313d7faf9b78d53eb18525b82833166..fb14ed89cb8a7a9a2203a166fba55c322dfa84ea 100644
--- a/Sources/Integration/Session/Session.swift
+++ b/Sources/Integration/Session/Session.swift
@@ -140,7 +140,7 @@ public final class Session: SessionType {
             }
         }
 
-        guard username!.isEmpty == false else {
+        guard let username = username, username.isEmpty == false else {
             fatalError("Trying to restore an account that has no username")
         }