Why the leading x on the tested strings ?  I'm aware of a reason for doing that when the string isn't quoted (it's a bad reason, because the variable dereference should be quoted in any case, which fixes the same problem better) but I see no reason to do it when the strings are quoted.  It looks like superstition, to me.