title: IllegalStateException textview cant be null with Kotlin
body: <p>I am trying to create a way to update the UI when activity starts by setting the text of a TextView in the navigation drawer. I keep getting an error that the TextView cannot be null? </p>
  
  <p>The error I get is an illegal state Exception userEmail must not be null</p>
  
  <p>This is the updateUI that  is supposed to update the profile info in the navigation drawer</p>
  
  <pre><code>private fun updateUI(user:FirebaseUser?) {
     if (user != null) {
     val userEmailText = findViewById&lt;TextView&gt;(R.id.userEmail)
     userEmail.text = user.email
     val errorTriage : String? = user.email
     println("User Email is ="+errorTriage)
     } else {
  val userEmailText: TextView = findViewById(R.id.userEmail)
  
     userEmailText.text = "Johndoe@someemail.com"
     userNameText.text = "John Doe"
  
     }}
  </code></pre>
  
  <p>This is the call to UpdateUI if user is signed in if so update profile data in navigation drawer THIS IS WHeRE THE ISsUE IS. If not it starts the FirebaseUI signin activity. </p>
  
  <pre><code>override fun onStart() {
      super.onStart()
      //Checks to see if user is already signed in
      if (mAuth.currentUser != null) {
          updateUI(mAuth.currentUser)
     } else {
          //user is not signed in
          startActivityForResult(
    AuthUI.getInstance().createSignInIntentBuilder().build(),
                  RC_SIGN_IN)
     }}
  </code></pre>
  
  <p>This is the layout</p>
  
  <pre><code> &lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
  android:paddingTop="@dimen/nav_header_vertical_spacing"
          app:srcCompat="@mipmap/ic_launcher_round" /&gt;
  
      &lt;TextView
          android:id="@+id/userName"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
       android:paddingTop="@dimen/nav_header_vertical_spacing"
          android:text="Android Studio"
          android:textAppearance="@style/TextAppearance.AppCompat.Body1" /&gt;
    &lt;TextView
          android:id="@+id/userEmail"
          android:layout_width="wrap_content"
  </code></pre>