removed typof function check

typof window["alert"] returns "object" in ie8 and below
see: http://stackoverflow.com/questions/12368739/javascript-typeof-alert-and-apply