Fix multipart inserts via Buffer

by type checking the `data`. If it is a string, use `Buffer.byteLength`, otherwise `data.length`.
So I was wondering about this too. This second change brings an implicit type check here; Anything that isn't a buffer will go through `Buffer.byteLength()` which throws for everything but string literals.