Check that __iter__() returns an iterator