title: AppCompatDelegate.setDefaultNightMode craches the application
body: <p>I want to change theme mode to dark like below:</p>
  <pre><code>AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
  </code></pre>
  <p>I use it in the avtivity creation function and get this error:</p>
  <p><strong>java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter view</strong></p>
  <p>Considering the activity has some fragments, I think I should recreate the activity and send it to fragments, but I don't know how. Any help will be appreciated.</p>