check for null assignee and remove unused code