Fixes #3742 Check for ret['result'] == None to avoid erroneous error logs