Type validation for objects/arrays.