Extracted some common type utility classes into a common package.