Revert changes to support Task.state=None.
task state cannot be none.