public function isValid($value) : bool { if ($value === null && $this->nullable) { return true; } return is_string($value); }