NULL tuples cause NPE when writing