i'm currently trying to replicate https://www.youtube.com/watch?v=WRxvZS3r1-g&t=348s this app, and at around 48:00, he made a custom function code which is return list.toSet().toList();
now it made an error which said "The method 'toSet' can't be unconditionally invoked because the receiver can be 'null'. Try making the call conditional (using '?.') or adding a null check to the target ('!')." how to fix this error