This is a decision involving potential risk and return and the time frame involved, much like any form of saving. You need to decide if you will be comfortable investing in something that may decrease in value in the short term but has the potential to produce superior returns over the long term.
Generally speaking, the longer the time frame, the more aggressive a saver can be, and as the time for withdrawal approaches, investments commonly are shifted to a more conservative allocation such as into traditional savings accounts, money market accounts or certificates of deposit. In that way, the funds are available when needed and are less subject, or not subject at all, to market downturns.
As with any large financial decision, it’s wise to seek professional guidance from someone who you trust with detailed information about your situation, and to regularly check your course as time goes along.