[Bug 38964] widl: inconsistent null pointer checks in typelib writer