Fixed a weird is_scalar conflict

In some cases if $checked = false but is boolean and the value of the
field is 0 the is_scalar would evaluate to true which obviously shouldn't happen
Merge pull request #1303 from tomschlick/patch-1

Fixed a weird is_scalar conflict