EXP-93. Fixes bug in writing null values in the generic api.

Reviewed by: kiyan

issue: https://jira.kiji.org/EXP-93