Fix to_json error on undefined float fields