You might also find the responses in this thread interesting: The scope of an unwrapped optional in an optional chain