Type checking of data types declarations