[Trigger] Fix a few cases of nullptr dereference
Fix a few cases of nullptr dereference found by clang-tidy (warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage])
There's more left around but I won't manage to go through all the clang-tidy logs before the weekend.