Replace strlen() calls with strict string comparisons
Note there is an important difference between the two ways to express
this: strlen() does a string cast, but the `=== ''` and `!== ''`
comparisons will only detect empty strings, but not null, false, or any
other falsy value that becomes an empty string when cast to be one.
I am only touching code where I'm sure the variable is guaranteed to be
a string.
This change is done because I find the strict comparisons much more
readable. The code does exactly one thing now, and no magic casts any
more.
Change-Id: I3e908a0c7c7b6c29b0e5a1414f2ba9062a215b93