[BUGFIX] Fix wrong condition in method checkValueForText