generate_phonemes: avoid writing null strings when open/close are null