Merge "Fix NPE in TaskRecord."