issue #11 pre-check for iterator before iterating