Refactor 'dataType' field overriding

It was hard to test where it was previously added.