     /// 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
-        if let result = _url.standardizingPath.map({ URL(reference: $0 as NSURL) }) {
-            return result
-        } else {
-            return self
-        }
+        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.

    /// Certain special characters (for example, Unicode Right-To-Left marks) cannot be used as path extensions. If any of those are contained in `pathExtension`, the function will return the URL unchanged.
    /// - parameter pathExtension: The extension to append.
    public func appendingPathExtension(_ pathExtension: String) -> URL {
        if path.isEmpty {
            return self
        }
        
        if let result = _url.appendingPathExtension(pathExtension) {
            return result
        } else {
            return self
        }
    }
    
    /// Returns a URL constructed by removing any path extension.
    ///
    /// If the URL has an empty path (e.g., `http://www.example.com`), then this function will return the URL unchanged.
    public func deletingPathExtension() -> URL {
        if path.isEmpty {
            return self
        }

        if let result = _url.deletingPathExtension.map({ URL(reference: $0 as NSURL) }) {
            return result
        } else {
            return self
        }
    }

    /// Appends a path component to the 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../".
        guard !path.isEmpty, let result = _url.deletingLastPathComponent.map({ URL(reference: $0 as NSURL) }) else { return self }
        return result
    }
    
    /// Returns a URL constructed by appending the given path extension to self.
