Lua: fix crash with unary not (~) on boolean constant/nil and let it work on boolean/nil values in general