So if dataTypeId is provided, the dataValueType is ignored? Seems like the "private" functions invoked here should just be made "public" and used.