You know, it hardly ever occurs that toString() returns null for an object; the objectitself is much more likely to be null. Therefore, you should check it.next() instead.
However, it.next() doesn't just return an object, it also goes ahead one step. To prevent this, you should cache the object: