null checks while loading and saving data