title: Allowing enum to be null in Avro schema
body: <p>In my Avro schema, I have a field called <code>myenum</code> of type <code>enum</code> as follows:</p>
  
  <pre><code>{
  "name": "myenum",
      "type": {
          "type": "enum",
          "name": "Suit",
          "symbols": ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
      }
  }
  </code></pre>
  
  <p>I also want <code>null</code> to be allowed. If I change the type to be a union with the default value as <code>null</code> (as suggested in <a href="https://stackoverflow.com/questions/50283736/avro-enum-field">this post</a>), it looks like this:</p>
  
  <pre><code>{
  "name": "myenum",
      "type": ["null", {
          "type": "enum",
          "name": "Suit",
          "symbols": ["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]
      }]
  }
  </code></pre>
  
  <p>When I test it with the following JSON object <code>{"myenum":"HEARTS"}</code>, I get an error - <code>Expected start-union. Got VALUE_STRING</code>.</p>
  
  <p>If I test it with a null value <code>{"myenum": null}</code>, it works. How can I make an enum field optional?</p>