"Know what your 401k plan does and does not allow in terms of withdrawals, know the tax implications, consider your time frame, and then decide."
Good advice. I would also add, for 401k plans, check total expenses very carefully. Sometimes you have to dig to get the real story. Many plans have very high expense ratios (greater than 2%) and offer limited ability to diversify, IMO. For those, I'd limit myself to amounts which trigger the employer match, and then move to the other choices.
Which, by the way, also include EE and I Bonds for educational purposes.