if(!console)
if(!window.console) or if( typeof console === 'undefined' )
https://github.com/amadeus/dbg