validates type declaration