provide additional checks to be sure we don't try to use console.log if it doesn't exist