title: NullPointerException when Serializing Nullable joda LocalDate (AVRO)
body: <p>I have the following date field declaration in my avro schema which is nullable or optional:</p>
  
  <pre><code>{
   "name" : "expiryDate",
   "type" : ["null", {
      "type" : "int",
      "logicalType" : "date"
   }],
   "source" : "element tradingExpiryDate"
  },
  </code></pre>
  
  <p>Generating the avro class works well, however, a nullpointerexception is encountered during serialization of the field.</p>
  
  <p>Is there a way on how to handle this?</p>