Use type_info, rather than name, for dictionary checking
Merge pull request #5399 from wmtan/UseTypeInfoForDictionaryChecking

Use class type_info, rather than class name, for dictionary checking