It is a good idea to have some money set aside for emergencies like loss of a job. It may take a few months to find a new job, and you want to be able to cover your expenses without having to get into expensive debt (e.g. not paying off credit cards), or having to move to a cheaper house.
We hope we never need to use our emergency fund. But just the fact that we have one helps us sleep better at night. We have about six months of expenses in our fund. It is currently in a checking account as cash, yielding about 0.85% interest. Not much, and there are ways to optimize this. Some people like CD ladders, but I believe they are not worth it. You could of course invest the money, but you may not have access to it right away, or you may be forced to sell at a loss. Bonds or similar vehicles may have penalties for early withdrawal.
I plan to invest about 3 months worth of our emergency fund, and keep the remainder in cash. That gives me three months to get the money out of the investments, which should be enough. Worst case there is a perfect storm where I lose my job at the same time that the companies I invested in go bankrupt. It's possible of course and if the economy takes a bad turn these things are more likely. However, if invested well, using the Active Passive screener, I have the benefit of dividends. At yield of even 2-3% means several hundred dollars per year in extra income.
If you do not have a fund, start one now. Start somewhere and track it. Set a goal to build up first one month of expenses. If you don't know your expenses, spend some time to add it all up, including those annual ones like insurance or taxes.
Do you have an emergency fund ? If so, do you keep it in cash or invest it ?