Improved FormHelper#check_box_checked?

Improved checking type of object in FormHelper#check_box_checked?

It fixes issue of mongoid: https://github.com/mongoid/mongoid/issues/3044