bug fix IE11

checks for undefined timer as well as null