Looks like Obj-C just ignores referencing with nil and program flow continues.
For example:
MetalContext->drawIndexedQuads()
NSMutableDictionary* textures = [[self getCurrentShader] getTexutresDict];
for (NSString *key in textures) {
id<MTLTexture> tex = textures[key];
CTX_LOG(@" Value: %@ for key: %@", tex, key);
[renderEncoder useResource:tex usage:MTLResourceUsageRead];
}
In the above code even if getCurrentShader() returns null we dont throw any exception/error. In such scenarios we need to verify for null.