Optional fields when they are serialized or deserialized is resulting in an array rather than and type of or None value