[Model Metadata] Improve convenience method and refactor unit tests

* Check for existing entry by key and set value if it exists