4D Write Pro allows its documents to be stored as an object. This allows it to be stored into a table field. When a new record or entity is created, Fields that are an Object type will default to a Null value. A Null value can create issues with the 4D WP commands that expect a 4D WP Document object.
In such cases, it would be best to properly initialize the field or implement checks in the code. When a new record or entity is created, the field should be assigned to WP New or a valid WP document object. Alternatively, code can be implemented to check if the field is Null before trying to interact with field using a WP command.
Performing some safe practices will prevent any run time errors due to the values contained for a field that should be a WP document object.