Might want to verify that splitTag has 2 elements. At one point TMI was sending only the tag name (and no value (=blah was missing)) to indicate true for a boolean property. We decided to instead to be more explicit for booleans with values 0 or 1 so that clients could more easily detect that its set to false instead of simply not being returned.
So while your code will work with the current tags implementation, it may not work in the future if we decide to send tag keys (without values).