Maybe:

`if not task.resultdata`:`