The original code is a good defensive practice; removing it can lead to notices if any key in the hierarchy is missing. (This is true in your other changes, too.)