What do the two terms in the savings growth formula represent?
The first term, P₀(1 + r/n)ⁿᵗ, is the future value of the lump sum growing entirely on its own, and the second term, PMT × [((1 + r/n)ⁿᵗ − 1) / (r/n)], is the future value of the recurring deposits growing as an annuity. Both terms compound at the identical periodic rate; they are simply added together because the lump sum and the deposit stream are two separate pools of money that happen to share one interest rate.
Set either input to zero and its term drops out cleanly. The formula does not need a special case for a missing lump sum or missing deposits.