Mac GUI: check that string is not empty

before trying to use it as a KV pair