update bs switch also for undefined value

it still works as before, plus it allows resetting
the switch with an undefined value (handy when resetting forms)