Remove unecessary use of TypeWithDict::typeInfo()
Commonality with code for ROOT6
Merge pull request #6896 from wmtan/RemoveUnnecessaryTypeInfoCalls

Remove unnecessary type info calls