Fixes #5303: don't write null for the variable in place of the empty val...

...ue, for non system variable