It is advisable to have an emergency fund with at least 6-12 months' worth of living expenses saved before retiring. This will cover unexpected costs like healthcare or home repairs and provide financial security in case of emergencies.