I would really appreciate if someone will help me.

I'm trying to make an app using kotlin for android and am running into problems because I get errors like "**Smart cast to 'Button!' is impossible, because 'activityButton1' is a mutable property that could have been changed by this time**"
I would really appreciate if someone will help me to fix this problem. Here is my code-

```
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.Spinner
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {
    private var activityButton1: Button? = null
    private var spinnerList: Spinner? = null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        activityButton1 = findViewById(R.id.clickMe)
        spinnerList = findViewById(R.id.spinner)
        val intentTo3 = Intent(this@MainActivity, ThirdActivity::class.java)
        val intent = Intent(this@MainActivity, SecondActivity::class.java)
        activityButton1.setOnClickListener(View.OnClickListener {
            val optionSelected = spinnerList.getSelectedItem().toString()
            if (optionSelected.equals("Custom BroadCast Receiver", ignoreCase = true)) {
                intent.putExtra("name", "custom")
                startActivity(intent)
            } else if (optionSelected.equals(
                    "System Battery notification receiver",
                    ignoreCase = true
                )
            ) {
                intent.putExtra("name", "battery")
                startActivity(intent)
            } else if (optionSelected.equals("Wifi RTT state change receiver", ignoreCase = true)) {
                intentTo3.putExtra("name", "rtt")
                startActivity(intentTo3)
            }
        })
    }
}

```