code: public function castToString()
      {
          if ($this->attributes['meta_type'] == 'array') {
              return $this->attributes['meta_value'];
          }
  
          $value = $this->getValue();
  
          if ($this->isStringable($value) || is_object($value) && method_exists($value, '__toString')) {
              return (string) $value;
          }
  
          return '';
      }
docs: Handle casting value to string.
  
  @return string