check that the timer is not nil before calling a function on it

This check is being done in a couple of other places, but not here. I don't have a concise test case for this, but it did blow up on me in a real use scenario.