Fix JS crashing when no countdown on page