minor: removing useless ternary operator in read pref module