For strings it's more readable to compare the string itself with "", instead of comparing len with 0. Fix all such cases. Update #1876