type validator works