added empty string check