Optional binding can refine the type.
https://docs.swift.org/swift-book/documentation/the-swift-pr...
https://docs.swift.org/swift-book/documentation/the-swift-pr...
edit: Wait, it's not in the article, I rewrote it and removed that section. My apologies! Anyway, yes, it's like that.