requirePreference

fun <T : Preference?> PreferencesFragment.requirePreference(key: String): T
fun <T : Preference?> PreferenceScreen.requirePreference(key: String): T
inline fun <T : Preference?> PreferencesFragment.requirePreference(key: String, action: T.() -> Unit)