If there is no omap, you get an iterator to an empty omap rather than a null iterator.  If the object exists, assert(iter) should always succeed.