I'm thinking something like this:

```objc
} else if ([actual isKindOfClass:[NSDictionary class]]) {
  NSArray *expectedKeys = [actual allKeys];

  NSArray *expectedValues = [expected objectsForKeys:expectedKeys notFoundMarker:[NSNull null]];
  NSArray *actualValues = [actual objectsForKeys:expectedKeys notFoundMarker:[NSNull null]];

  return [expectedValues isEqual:actualValues];
}
```

Though perhaps `NSNull` is a poor choice for the marker, and a unique object would make more sense (so any keys not found are always an error).