Replace Type Code With Class

Problem:

A field's type (e.g. a String or int) fails to protect it from unsafe assignments and invalid equality comparisons.

Solution:

Constrain the assignments and equality comparisons by making the type of the field a class.