Fix null pointer exception when encountering tasks that have no project.