Moved type checking to DataTypeBase class