Separate the check of empty string for value and text (to avoid risk of finding the expected empty string as widget value just because it defaults to the text which itself is empty)
(cherry picked from commit d7d175baf4a4b0e3f4a82ddaf883806c3ca07075)