Stand alone smoke detectors (common in older homes) , that are not 'hard wired' into a security system or your homes electrical system, do not last for ever. When they quit working, they quit working without any warning in most cases. You are left without protection until the next time you do a battery check. And then you will wonder if the replacement battery is bad. That wastes more time.
When you purchase a new smoke detector, mark the date you purchased it with a 'black felt tip pen' on the unit near the battery location. Each time you change the batteries check the date.
In this area of Coastal Northern California a stand alone smoke detector will not last near as long as in the dry climate of Southern Arizona. The electronics will corrode and the unit will stop working.
Do not hesitate to spend a few dollars to replace an aging smoke detector. And always have a new one on hand to replace a defective one.
It is your life and property!