Added type check for console.log to prevent IE8+modernizr issues