fix export and casting behaviour of boolean validator
fixes #1422