Since a company is not under any obligation to offer a profit sharing plan, they can pretty much make up the rules as to how it is used.
Because of their pre-tax status, 401k plans are limited in how and when they can be accessed. But if the company closes, or if your employment with the company terminates for any reason, you will be given a list of the various options you have for the 401k. One of those options will be to cash it in, if that is what you mean by closing the account. However, if you do, you will have to pay tax on it and if you are under 59 1/2 you will have to pay a penalty for doing so.