Understand your own risk tolerance and discipline. From Moneychimp we can see different market results -

This is a 15 year span, containing what was arguably one of the most awful decades going. A full 10 year period with a negative return. Yet, the 15 year return was a 6.65% CAGR. You'd net 5.65% after long term cap gains.
Your mortgage is likely costing ~4% or 3% after tax (This is not applicable to my Canadian friends, I understand you don't deduct interest). In my not so humble opinion, I'd pay off the highest rate debts first (unlike The David followers who are happy to pay off tens of thousands of dollars in 0% interest debt before the large 18% debt) and invest at the highest rate I'd get long term. The problem is knowing when to flip from one to the other.
Here's food for thought - The David insists on his use of the 12% long term market return. The last 100 years have had an average 11.96% return, but you can't spend average, the CAGR, the real compound rate was 10.06%. Why would he recommend paying off a sub 3% loan while using 12% for his long term planning (All my David remarks are not applicable to Canadian members, you all probably know better than to listen to US entertainers)?
I am retired, and put my money where my mouth is. The $200K I still owe on my mortgage is offset by over $400K in my 401(k). The money went in at 25%/28% pretax, has grown over these past 20 years, and comes out at 15% to pay my mortgage each month. No regrets. Anyone starting out now, and taking a 30 year mortgage, but putting the delta to a 15 year mortgage payment into their 401(k) is nearly certain to have far more in the retirement account 15 years hence than their remaining balance on the loan, even after taxes are considered. Even more if this money helps them to get the full matching, which too many miss.
All that said, keep in mind, the market is likely to see a correction or two in the next 15 years, one of which may be painful. If that would keep you up at night, don't listen to me. If a fixed return of 4% seems more appealing than a 10% return with a 15% standard deviation, pay the mortgage first.
Last - if you have a paid off house but no job, the town still wants its property tax, and the utilities still need to be paid. If you lose your job with $400K in your 401(k)/IRA but have a $200K mortgage, you have a lot of time to find a new job or sell the house with little pressure from the debt collectors.
(To answer the question in advance - "Joe, at what mortgage rate do you pay it off first?" Good question. I'd deposit to my 401(k) to grab matching deposits first, and then if the mortgage was anywhere north of 6%, prioritize that. This would keep my chances at near 100% of coming out ahead.)