Sorry, my comment was on the wrong method anyway, it only makes sense to do this on set_pref... I see your points and in that case would prefer we map the JavaScript methods, and have get_int_pref, set_int_pref, etc. Passing the types as string arguments just doesn't seem safe to me.