base: Add nullptr checks to logging.cc.

Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined
behavior.

BUG=593561

Review URL: https://codereview.chromium.org/1778083003

Cr-Commit-Position: refs/heads/master@{#380747}
1 file changed