Initialize json_object to NULL in object_to_json_object()

Otherwise it leads to strange behaviours when object's type is not among
those which are tested.