Can we pass in `data` as a Buffer and just do `data.length` to avoid having to stringify twice? Also, looks like there is an existing bug if `data` is an empty string, we will stringify it and sent `""`, but this `if` will see it as an empty string and set length `0`.