check console object before console.log()