I think you don't need the `if` condition, `clearTimeout` works fine with "null".