fix(hooks): false value was considered as undefined in javascript

Fixes #6499
fix(hooks): registered handers couldn't be concatenated in javascript version

Fixes #6531