I lied. It's a little confusing, but it actually works as is.

The `chunk` value is actually a reference to `arguments[0]` when a value is passed.  So by handling the `== null` case we avoid passing any values that won't end up calling `write()`.

I'll still add a test case.