added non-null checking for tasklist saving