This error can occur when programmatically saving entities. You probably saved a value in a wrong format.

$node->set('field_vacancy_location', ['value' => $location, 'format' => 'full_html']);

In the above example I wrongly saved a full_html format to a regular textfield and got the error. 

$node->set('field_vacancy_location', $location);