In the case of bacteria, the cell wall is a very thick non-lipid wall whose function is to protect the cell fluid contents from such adverse effects as heat, osmotic pressure changes and even freeze-drying in the absence of a preserving agent, such as a sugar.