Check length of String before checking if it's 8/16 bit

String::is8Bit() can't be called on 'null' Strings, so check if the
length is zero first.

BUG=586135

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

Cr-Commit-Position: refs/heads/master@{#375451}
4 files changed