Add ability to encode NULLs

In some situations it would be nice to send NULLs instead of empty binaries.