Since API version 1.4, NullPointerException is thrown for casts of null to any type instead of TypeCastException.
next()
and `componentN()` calls. There were issues when we have iterables from Java where the element type has "not null" type information.