I've knocked the odd low branch or two. Never crashed it either. Building a Christmas list and just wondered if these things have a shelf life that's all.
i change after every head impact
It depends on usage. They degrade slowly with time and more quickly with UV exposure - sweat can also degrade them.
IIRC different companies give different times but 5 yrs average use is normal I think - or as Jedi says after any significant impact
I've never worried about branch impacts. If you do anything other than just lightly scrape it in a crash, you should replace it. If you hit it hard enough you'll make a perfect imprint of your head on the inside. I'd usually say a couple of years is a good lifespan if you use it every day however I usually manage a good crash more often than that!