Array type check while traversing object members