Check the selectedUser before calling TaskService

When the selectedUser is null, deleteUserIdentityLink() should be called to remove the origin assignee of task.
If the origin assignee and selectedUser are both null, do nothing.