only allow valid pref types, throw otherwise..