title: How can I check for generic type in Kotlin
body: <p>I'm trying to test for a generic type in Kotlin.</p>
  
  <pre><code>if (value is Map&lt;String, Any&gt;) { ... }
  </code></pre>
  
  <p>But the compiler complains with</p>
  
  <blockquote>
    <p>Cannot check for instance of erased type: jet.Map
  </blockquote>
  
  <p>The check with a normal type works well.</p>
  
  <pre><code>if (value is String) { ... }
  </code></pre>
  
  <p>Kotlin 0.4.68 is used.</p>
  
  <p>What am I missing here?</p>