Implement setTypeIdAndData