Using the Drupal Form API, you might decide to use the ‘password’ form
item. Sooner or later, you might also find that the default value
eventually get’s deleted.
After a form submit, any previously existing value will not be passed
into the form state values. So if you leave the form item blank, your
previously existing value will be deleted.
I stumbled upon a great solution on StackExchange.
To prevent a previously existing value from being deleted, we check for
a blank form item.