The current code checks that the *exact* type is in a conversion dictionary, then falls back to a default.
More correct would be to look at the mro of the type, only fall back when none of the mro is in the dict.
In fact, the fallback case would never happen, since object is in the dict.