I don't think real estate/paying into your mortgage is risk-free. I'd say it's about as risky as long term investments into the stock market.
Over all of recorded history, the stock market has gone up 10%/year on average (not accounting for taxes/inflation).
The common rebuttal to that is that past performance is not an indicator of future performance.
Sure, but then you have to apply the same logic to the supposedly "risk-free" real estate. I think it's just as likely that your house becomes worthless as the stock market no longer giving 10% returns.
My more general argument is that for all intents and purposes the stock market is a gauge of the overall economy. If suddenly the stock market stopped returning 10%/yr the economy as a whole would be in serious trouble. No investments, real estate or otherwise, would be safe. Your stocks would be as worthless as money stashed under a mattress.
That's my logic, at least. Of course, as I said, I don't follow that logic personally. Not that I don't agree with it, just that I'm willing to sacrifice financially in exchange for the satisfaction of owning our home.