title: Why do I get the information Enum argument can be null in Java, but exhaustive when contains no null branch in Kotlin?
body: <p>Code B works well, but the Code A get the following warning prompt (It can run), why?</p>
  <p><em>Enum argument can be null in Java, but exhaustive when contains no null branch</em></p>
  <p>I think <code>_playState.value</code> can be null in Code B too, do I should add null branch when I use <code>exhaustive when</code> in Code B?</p>
  <p><strong>Code A</strong></p>
  <pre><code>private val _selectAction = MutableLiveData&lt;ESelect&gt;()
  val selectAction: LiveData&lt;ESelect&gt; = _selectAction
  
  selectAction.observe(mLifecycleOwner) {
     when(it) {               //Enum argument can be null in Java, but exhaustive when contains no null branch                                   
           ESelect.SelectAll    -&gt; binding.chSelect.isChecked = true
           ESelect.UnselectAll  -&gt; binding.chSelect.isChecked = false
           ESelect.NoAction     -&gt; Unit
     }
  }
  
  
  
  enum class ESelect{
      SelectAll,
      UnselectAll,
      NoAction  
  }
  </code></pre>
  <p><strong>Code B</strong></p>
  <pre><code>private val _playState=MutableLiveData&lt;EPlayState&gt;()
  
   override fun playOrPause(filename: String) {
          when (_playState.value) {
             EPlayState.STOPPED -&gt; play(filename)
             EPlayState.PLAYING -&gt; pause()
             EPlayState.PAUSED  -&gt; resume()
          }
      }
  
  
  enum class EPlayState {
      STOPPED,
      PLAYING,
      PAUSED
  }
  </code></pre>