core: Make sure js boolean values are converted correctly.