Preventing null when loading or cloning

I’ve created a custom class to store my save data, which I’m then serializing to a file on save. This all works well and good, I can deserialize the file when I load it up and I get all the values right where they belong.

However, I run into an issue when I add additional values to my custom class, resulting in the loaded file populating any new values as null, instead of the default values I have set for them.

I’m wondering if there’s an elegant way to either prevent the load from overriding existing values with null (I still want it to override existing values if the load is putting a new value there). Or if there’s a way to clone my class to a new instance and weed out the nulls during that exchange.

For reference, I’m using the SaveLoad method detailed in this blog

Basicly your old save files are “outdated”. They´re mising additional data you have added to your class after creating the save. Therefore Unity cannot know how to fill missing variables. It´s a miracle you can load the file. Elegant way would be to add version attribute and a switch that would call functions extracting additional data from your saves depending on the version.

But its way easier to just delete old saves and make new ones.