Flip encounteredError
Reduce nesting
Use id<MTLTransformerErrorHandling>
Add explicit required
Fix style of blocks returning id