 
     /// Returns true if there is no path.
     public func isEmpty() -> Bool {
-        return path == nil || path!.isEmpty()
+        return path?.isEmpty() ?? true
     }
 
 

    /// The color to stroke the path, or nil for no fill. Defaults to opaque black. Animatable.
    public var strokeColor: Color? {
        get {
            if let color = shapeLayer.strokeColor {
                return Color(color)
            } else {
                return nil
            }
        }
        set(color) {
            shapeLayer.strokeColor = color?.CGColor

    ///An optional variable representing a gradient. If this is non-nil, then the shape will appear to be filled with a gradient.
    public var gradientFill: Gradient? {
        didSet {
            guard let gradientFill = gradientFill else {
                fillColor = clear
                return
            }
            
            let gim = gradientFill.render()?.cgimage

            //inverts coordinate for graphics context rendering
            var b = bounds
