protected function isValid($value)
    {
        $value = (string) $value;
        foreach (static::$enumConstants[get_class($this)] as $constantValue) {
            if ($value === (string) $constantValue) {
                return true;
            }
        }
        return false;
    }