fun <T : Preference> PreferenceFragmentCompat.requirePreference(@StringRes preferenceId: Int) = requireNotNull(findPreference<T>(getPreferenceKey(preferenceId)))
Find a preference with the corresponding key and throw if it does not exist.