Make hashmaps type-safe.