Added type check for Record, Set and UnionRecord types.