for `write` and `getActiveMessageFields`, you can check if the lists are `null` OR if their length is `0`.  If either of those cases, don't write/read them.