timer: fix null access if not initialized