title: How to unwrap value with guard of enum with associated values?
body: <p>I try to unwrap <code>instance</code> like this, but it is obviously wrong:</p>
  <pre class="lang-swift prettyprint-override"><code>func properties(context: Context, properties: Any, instance: DataToValidate, schema: JSONObject) throws -&gt; AnySequence&lt;ValidationError&gt; {
      guard let instance = instance as? JSONObject else { // &lt;---
      return AnySequence(EmptyCollection())
    }
  </code></pre>
  <p><code>instance</code> has this type:</p>
  <pre class="lang-swift prettyprint-override"><code>public enum DataToValidate {
      case object(JSONObject)
      case array(JSONArray)
      case string(String)
  }
  </code></pre>