<p>To get the value of the variable, being $null or something else, then you have to use some internal fixup function -- maybe ds_select_dst() from dispatcher has something like that, not 100% sure though.</p>
<p>Anyhow, the best in my option would be an empty string in this case. There are couple of other functions with the same behaviour (e.g., t_on_branch("") ...).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1912#issuecomment-479401325">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZfHTLEljc8ldPib-61gwImzy0cXmks5vdGycgaJpZM4cP-3E">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZVGtXJmOu6oNIaG0n4Gzk2m4N57Mks5vdGycgaJpZM4cP-3E.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@miconda in #1912: To get the value of the variable, being $null or something else, then you have to use some internal fixup function -- maybe ds_select_dst() from dispatcher has something like that, not 100% sure though.\r\n\r\nAnyhow, the best in my option would be an empty string in this case. There are couple of other functions with the same behaviour (e.g., t_on_branch(\"\") ...)."}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1912#issuecomment-479401325"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1912#issuecomment-479401325",
"url": "https://github.com/kamailio/kamailio/pull/1912#issuecomment-479401325",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>