The code looks fine. TypeInfo is used at runtime to describe compile time constructs. Classes require it for down casting, it is acquired from the runtime value. For instance if the reference is null, the TypeInfo should be null as well.