fix empty string checking