Export Grid to CSV with Null parent property

I have a grid that one of the columns Property is set to a sub property.
Example: Property="CreatedBy.Name"

When I try to export the grid and if "CreatedBy" is null in any row, then it throws and error "Object reference not set to an instance of an object."

Is there a way to avoid that?

Try null conditional operator:

Property="CreatedBy?.Name"