`clearInterval` can be consolidated into one line above the error checking.