Cleaning up whitespace.
Only calling console.log when console exists.