Fix erlang -> json conversion for bool and null