It seems like this pattern reoccurs very often. Perhaps we could create an `AttributedType` base class?