Spot the bug in the email lookup

from Optionals
Swift 6.3.3 intermediate 4 min 2 issues to find

Find why this helper can trap for ordinary input.

swift
struct User {
    let email: String?
}

func normalizedEmail(for users: [String: User], id: String) -> String {
    let user = users[id]!
    return user.email!.lowercased()
}
Open in playground
Report an error