Fixed methods singleton and combine (week4/part1) to correctly treat cases when the tree is null or empty