Try:

if(defined $xavp(tm_contacts))

or:

if($xavp(tm_contacts) != $null)

Both of the above worked, Thanks!
 
I do wish "truthiness" of various sorts were better defined in Kamailio.

I don't quite follow what you mean here, but I probably agree with you. In particular for t_load_contacts() -

     If the destination set contains only one branch, the function does nothing.

     Function returns 1 if loading of contacts succeeded or there was nothing to do. In case of an error, function returns -1 (see syslog).

I guess in my mind it might be worthwhile to return a different return code if the destination set contains only one branch.

Thanks again.