It seems `batch` is silently ignoring the pairs with a wrong `'type'`. Is this expected?
I'll add a test to cover this behavior in the WriteStream.