Use SynchronizedDictionary for cache in TypeMapper, to avoid race-conditions.