Check for nil instead of falsiness

This allows required boolean fields to be set to false.
Add test case for required booleans

This exercises a required boolean field set to false
Merge pull request #1 from bts/fix-false-required-booleans

fix exception when setting non-optional bool field to 'false' (pull request #1)