The one with the cast, since it makes it explicit what we do (and assumptions we make about the kind). Further, they are not equivalent: The second one will fail if `elementKind == UNDEFINED`.