protected function isEmpty($value, Rule $rule)
    {
        if (is_callable($rule->isEmpty)) {
            return call_user_func($rule->isEmpty, $value);
        }

        return $value === null || $value === [] || $value === '';
    }