Since `runtimeType.toString()` may be slow, we should cache the mapping back to the base type for use later. (To be confirmed by benchmarks, of course).