add doIfNotNull func.
unify by grouping task operations to task operator.