Small changes to TypeValidator