Refactoring to increase test coverage, added TypeValue::isSubtypeOf method