modal popup bug fix IE11

checks for undefined timer as well as null timer, so that modal doesnt popup and disappear under IE 11