I would simply return the object here (wether its a nullptr or not) without testing or giving an error message.
Whereever this is called, you need to make exception-handling there anyway so giving an error message is the responsibility of the calling methods (e.g. the condition-setup-dialog).