Check if a Python object is a null externalptr
Details
When Python objects are serialized within a persisted Renvironment (e.g. .RData file) they are deserialized into nullexternalptr objects (since the Python session they were originallyconnected to no longer exists). This function allows you to safelycheck whether whether a Python object is a null externalptr.
Thepy_validate function is a convenience function which callspy_is_null_xptr and throws an error in the case that the xptrisNULL.