public static function isNotEmpty($resource)
    {
        if (!self::isValid($resource) &&
            null !== $resource) {
            return false;
        }

        return ($resource !== null && $resource !== '');
    }