let $d := doc('/test/a-false.json')
return ($d, if ($d/a) then 'false is true' else 'false is false')
The result:
{"a":false}
false is true
Really?
StackOverflow's robot was not contented with the above, so I will add some meaningless text that you don't have to read, even though I think the above is more than adequate at describing the problem. Long live our mechanical overlords.