@Override
    public boolean isNullValue() {
        return NullValue.TYPE_ID == getTypeId()
               || getValueBuffer().remaining() == 0;
    }
Only call this after you have finished writing to the output stream.
stroom-pipeline/src/main/java/stroom/pipeline/refdata/store/StagingValueOutputStream.java