I finally solved the problem!
If someone has the same problem:
You just have to add if current_line != null:
after var current_line = parse_json(save_game.get_line())
So this part of code should look like this:
while not save_game.eof_reached():
var current_line = parse_json(save_game.get_line())
if current_line != null:
var new_object = load(current_line["filename"]).instance()