Seeing it happens when an ACK was received by trying to dump $T_rpl(...), the docs specify it has to be used in failure route blocks, not being the case in this crash situation:
* https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#t_rpl_pv
I added safety checks in the code to catch such cases and return $null.