You misunderstood the documentation. This:
If the value of the right side of the key path is nil, it is ignored.
Means that if @min.field is nil, it will be ignored. But what you're doing is trying to calculate the minimum and the maximum of a collection containing NSNumber's. So probably the decimalValue method will be used, but NSNull is not key value compliant for that key. So you should keep removing NSNull objects from the collection.