If you're using typescript, why not use an enum for `data_type` to make the code that dispatches on its value more readable?