title: MutableList<Any> addAll kotlin entire arraylist added as object
body: <p>Following is my code</p>
  <pre><code>var items : MutableList&lt;Any&gt; = arrayListOf()
          items.add(TeacherDetails(it?.photo,it?.firstName,it?.lastName,it?.level))
          items.add(TeacherBio(it?.bio))
          items.add(TitleAccreditations(getString(R.string.acreditations)))
          items.add(SessionsTitle(it?.firstName + getString(R.string.apostrophe) + getString(
                          R.string.sessions)))
          items.addAll(listOf(it?.classes ?: arrayListOf()))
          items.add(IntroVideo(it?.introVideo))
          items.addAll(it?.teachingAccreditations?.split(&quot;\n&quot;)?.map { Accreditation(
              it
          ) }?: emptyList())
  </code></pre>
  <p>Issue is at following line it is adding entire list as object instead of individual item.</p>
  <pre><code>items.addAll(listOf(it?.classes ?: arrayListOf()))
  </code></pre>
  <p>Following is my model</p>
  <pre><code>data class Teacher(
  
  @field:SerializedName(&quot;firstName&quot;)
  val firstName: String? = null,
  
  @field:SerializedName(&quot;lastName&quot;)
  val lastName: String? = null,
  
  @field:SerializedName(&quot;teacherId&quot;)
  val teacherId: String? = null,
  
  @field:SerializedName(&quot;introVideo&quot;)
  val introVideo: String? = null,
  
  @field:SerializedName(&quot;level&quot;)
  val level: String? = null,
  
  @field:SerializedName(&quot;teachingAccreditations&quot;)
  val teachingAccreditations: String? = null,
  
  @field:SerializedName(&quot;classes&quot;)
  val classes: List&lt;ClassesItem?&gt;? = null,
  
  @field:SerializedName(&quot;photo&quot;)
  val photo: String? = null,
  
  @field:SerializedName(&quot;bio&quot;)
  val bio: String? = null
  )
  </code></pre>