Modify a field value before the element is saved
It turns out that serializeValue is what I needed.

public function serializeValue($value, ElementInterface $element = null)
{   
    if ($value == 'foo') {
        $value = 'bar';
    }

    return $value;
}