use writeOptionalStreamable