Fixing badge when value set to nil or empty string