gives appropriate inner types for Sets and Map.