[REF] Fix PHP8.1 issue with passing NULL to trim()