Here's a neat chart from J.P. Morgan showing that despite the superficial similarity of today's S&P 500 to the S&P 500 of the past two peaks, things really are different this time. In particular, the forward price-to-earnings ratio is much lower right now than it was either of the two previous times around. Relative to corporate profits, in other words, stocks look much cheaper.
Of course that's no guarantee. The PE ratio of the 2007 peak was much lower than the PE ratio of the 2000 peak, and that didn't stop the market from crashing. But the fact is that today's valuations don't reflect any particularly high level of optimism about economic growth or corporate earnings. With bond yields as low as they are right now and corporate profits as high, buying up equity stakes in large companies looks like a solid value investment.