MessageTemplate API - Fix saving of templates with workflow_name sans workflow_id
Overview
--------
This fixes a bug when saving (updating) a `MessageTemplate` record that
involves a `workflow_name` and no `workflow_id`. It is an alternative to #21674.
Steps to reproduce
-------------------
Suppose you read a MessagTemplate with values:
```php
$values = ['workflow_name' => 'foo', 'workflow_id' => NULL, ...]
```
Then you save it back:
```php
civicrm_api4('MessageTemplate', 'update', [
'values' => $values
]);
```
Before
------
The `update` raises an exception.
After
-----
The `update` works.