Refactor basic type validators