Though it&#x27;s a C API, CGBitmapContextCreate is notorious for this.<p>While it doesn&#x27;t address everything you&#x27;re alluding to, I&#x27;m a big fan of Swift&#x27;s nonnull&#x2F;nullable making its way into Objective-C since some of Apple&#x27;s APIs don&#x27;t play well with a nil parameter (e.g., -[NSString isEqualToString:]).