console.log only if defined