This is done below, with obj_or_none(r).