When publishing a Nintex Workflow in SharePoint on-premise (2013, 2016 or 2019), if the workflow title has a trailing space, an error message will appear.
"soap:ServerServer was unable to process request. ---> Object reference not set to an instance of an object"
If the workflow is being imported it will need to be reimported making sure there is no trailing space in the workflow title before publishing it.
If this is a new workflow it will need to be recreated making sure there is no trailing space in the workflow title before publishing it.
Unfortunately deleting the space and trying to publish the workflow again will not resolve the issue as a different error message is shown after closing the error message. The workflow can no longer be published so another workflow needs to be created.