protected function isEmpty($value) { return $value === '' || $value === [] || $value === null || is_string($value) && trim($value) === ''; }