type safe preferences