title: How to check generic class type is array?
body: <p>I want to check whether the generic class type is an Array:</p>
  
  <pre><code>func test&lt;T&gt;() -&gt; Wrapper&lt;T&gt; {
    let isArray = T.self is Array&lt;Any&gt;
    ... 
  }
  </code></pre>
  
  <p>But it warns</p>
  
  <blockquote>
    <p>Cast from 'T.type' to unrelated type 'Array' always fails</p>
  </blockquote>
  
  <p>How can I solve this problem?</p>
  
  <p>added: I've uploaded my codes to Gist.
  <a href="https://gist.github.com/nallwhy/6dca541a2d1d468e0be03c97add384de" rel="noreferrer">https://gist.github.com/nallwhy/6dca541a2d1d468e0be03c97add384de</a></p>
  
  <p>What I want to do is to parse json response according to it's an array of model or just one model.</p>