Convert x.typeinfo to typeid(x)

This had me really confused until I realized `Interface` in `object` actually has a member named `classinfo`.