Fixes #1122 -- don't clearTimeout(undefined)