By throwing an exception in the `toArray` function when a required field is empty.
By throwing an exception in the
toArrayfunction when a required field is empty.