Typesafe heterogeneous maps