Type validation