OrderedTask: allow calls with empty task

Fixes potential crash bugs.