title: In Kotlin, how to check List<Any> contains one or another dataclass?
body: <p>I have two data classes</p>
  
  <pre><code>    data class Card(val code: String?, val caption: String?, val icon: String?)
      data class Currency(val code: String?, val caption: String?, val descr: String?)
  </code></pre>
  
  <p>which are organized into lists: <code>List&lt;Card&gt; and List&lt;Currency&gt;</code> which I use as parameters when calling a one function. The parameter type is defined as <code>List&lt;Any&gt;</code>. How inside a class or function I can determine the type of data?
  Is that list of Card or list of Currency?</p>
  
  <p>This is for Android application on Kotlin</p>
  
  <pre><code>class SpinnerAdapter(val context: Context, var name: List&lt;Any&gt;): BaseAdapter() {
      init {
          if (name.contains(Card)) { //is list of Card?
  
          }
      }
      override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
     ...
  </code></pre>