inductor_provenance: Correctly handle null provenance
Summary:
X-link: https://github.com/pytorch/pytorch/pull/166019
If the provenance is null, we're getting crashes of the form
```
[trainers0]:E1021 10:51:31.990525 2752 PythonApi.h:87] Exception caught in
GeneratedDynamoCompileLoggerConfig: <class
'dsi.logger.py3.GeneratedDynamoCompile.LogEntry.thrift_types.GeneratedDynamoCompileLogEntryThriftBase'>:
error initializing Thrift struct field 'inductor_provenance_thrift_safe':
Cannot create internal string data representation. Expected type <class 'str'>,
got: <class 'NoneType'>.
```
Also fixed a type signature that wasn't being enforced. (It's still not
enforced, but it's accurate).
Reviewed By: ppanchalia
Differential Revision: D85173596
fbshipit-source-id: cccd7a8a3a840d7938083dbd7d029e761fd616b2