When onGoodUpgrade is being thrown, the current upgrade may be null. We now take care of it.