fix NPE in iterator of unknown type by throwing ISE