if (typeof val !== 'string') {
      return false;
    }
Serializes strings with non-ASCII characters to their Unicode escape
sequences (eg. \u2022), to avoid hitting this lint rule:
"Source code should only include printable US-ASCII bytes"