peel_ref: check object type before loading