checking if the fetched currentUpgrade is not null before working with it