title: How to check that Verilog enum is valid?
body: <p>If I receive an enum:</p>
  
  <pre><code>my_cmd cmd = my_cmd'(value_from_bus);
  </code></pre>
  
  <p>How do I easily check that <code>cmd</code> is a valid cmd?</p>
  
  <pre><code>typedef enum int {
    ADD = 1,
    SUBTRACT = 3,
    MULTIPLY = 7
  } my_cmd;
  </code></pre>