public static function isSelected($value, $valueObject)
    {
        if(is_array($value) && count($value) > 0)
        {
            return in_array($valueObject, $value);
        }

        if($value instanceof Collection)
        {
            foreach($value as $v)
            {
                if($v->getKey() === $valueObject)
                {
                    return true;
                }
            }
            return false;
        }
        elseif($value === $valueObject)
        {
            return true;
        }
        return false;
    }