public static function checkType($item)
    {
        if (is_string($item)) {
            // Item is a string; check to see if it's a URL or filepath
            if (filter_var($item, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)) {
                // Item is a URL
                return Type::URL;
            } elseif (is_file(config('filer.path.absolute') . "/{$item}")) {
                // Item is a filepath
                return Type::FILEPATH;
            }
        } elseif (is_a($item, 'SplFileInfo')) {
            // Item is a file object
            return Type::FILE;
        }

        // Throw an exception if item doesn't match any known types
        throw new Exception('Unknown item type');
    }