     /// If the `isFileURL` is false, this method returns `self`.
     public func resolvingSymlinksInPath() -> URL {
         // NSURL should not return nil here unless this is a file reference URL, which should be impossible
-        if let result = _url.resolvingSymlinksInPath.map({ URL(reference: $0 as NSURL) }) {
-            return result
-        } else {
-            return self
-        }
+        guard let result = _url.resolvingSymlinksInPath.map({ URL(reference: $0 as NSURL) }) else { return self }
+        return result
     }
 
     /// Resolves any symlinks in the path of a file URL.

    /// If the URL has an empty path (e.g., `http://www.example.com`), then this function will return the URL unchanged.
    public func deletingLastPathComponent() -> URL {
        // This is a slight behavior change from NSURL, but better than returning "http://www.example.com../".
        if path.isEmpty {
            return self
        }
        
        if let result = _url.deletingLastPathComponent.map({ URL(reference: $0 as NSURL) }) {
            return result
        } else {
            return self
        }
    }
    
    /// Returns a URL constructed by appending the given path extension to self.

    /// If the `isFileURL` is false, this method returns `self`.
    public var standardizedFileURL : URL {
        // NSURL should not return nil here unless this is a file reference URL, which should be impossible
        guard let result = _url.standardizingPath.map({ URL(reference: $0 as NSURL) }) else { return self }
        return result
    }
    
    /// Resolves any symlinks in the path of a file URL.
