Rename tinnydb tags if the name already exists

The user enters the TAG name of tinnydb and tags appears in the Spinner list

If the name already exists, I want a message to appear to the user stating the need to change the name because the name already exists

If the user choose Yes he can rename tag
If No .. App automatically overwrite or update data tag

How can I do it

If is in list (TinyDb1.GetTags, Textbox1.Text) then 
  complain to user (using the Notifier with choice buttons)
else
  store in TinyDB1 at tag Textbox1.Text value Textbox2.Text

If choice = overwrite then

  • store in TinyDB1 at tag Textbox1.Text value Textbox2.Text