dta record macro: support for optional fields

In the data declaration, the optional field has type "Maybe x".
If the key is not present in the DTA it will be Nothing,
and if it is Nothing then when serialized the key will not be created.