KeyPath Value is Nil, but If-Let succeeds?

What you're looking for is

if case let value?? as Any?? = object[keyPath: kp] {

No. There was once a point in AnyKeyPath, but a decade has passed.

1 Like