title: java.lang.IllegalStateException: TextView must not be null (Android/Kotlin)
body: <p>I have the following ViewHolder class for my Recycler View,</p>
  
  <pre><code>inner class ItemViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
  
          private val dateText = itemView.itemDateSummaryList
          private val systolicVal = itemView.systolicValue
          private val diastolicVal = itemView.diastolicValue
  
          fun update(listItem: SummaryListItemModel) {
              Log.i(TAG, "Update method called " + listItem.date)
              dateText.text = listItem.date
              systolicVal.text = listItem.sysVal.toInt().toString()
              diastolicVal.text = listItem.diasVal.toInt().toString()
          }
  
      }
  </code></pre>
  
  <p>But when I run the app an error comes up at the <code>dateText.text = listItem.date</code> saying,</p>
  
  <pre><code>java.lang.IllegalStateException: dateText must not be null
  at *****.******.*****.ui.detailview.bloodpressure.SummaryListAdapter$ItemViewHolder.update(SummaryListAdapter.kt:68)
  </code></pre>
  
  <p>But the <code>listItem.date</code> is not null I have check with the Log.</p>