object type check while traversing object members