validate type