Move null check into lookupIterator.