only write out a value if there is a value