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.
making the statement two if clauses fixes this because it wont drop down into the
is_scalar block