Consider the following example involving the nil coalescing operator ??:
let mysteryInc = ["Fred": "Jones", "Scooby-Doo": nil]
let lastname = mysteryInc["Scooby-Doo"] ?? "no last name"
print(lastname == nil) // true
As shown by the last print statement, the result of the nil coalescing operator is nil.
If the nil coalescing operator is supposed to unwrap an Optional, why is it returning nil?