code: public function encode($value, Field $field, Codec $codec = null)
      {
          $value = trim($value);
          if ($value === '') {
              return null;
          }
  
          return $value;
      }
docs: {@inheritdoc}