Add timer check to prevent NPE