That’s just an underlying iteration variable’s type inference. When the iterable runs out of elements, it has a value of nothing. In general you don’t have to worry about inferences of 2-3 element Unions, especially if they don’t propagate into larger ones or Any via multiple arguments in function calls. The compiler just duplicates the code into 2-3 type-stable branches if needed.