avoiding NPE when serializing lists with null values