Fix MMP-1243: NPE when a return type wraps a simple type