This trim reported an error when I was making the project today.
First of all, we know that trim is a method applied to strings, so at this time, there may be something in the data that is not a string.
After investigation, it is found that a value is null, so adding a ternary expression can solve this problem