Added macro for data type validity checking.