resource_channels: Check if a passed in ID is NULL before checking its length

Calling strlen on a NULL string is explosive. This patch checks whether or not
the passed in string is NULL or zero length before checking to see if the
string is too long.
........

Merged revisions 410274 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@410275 f38db490-d61c-443f-a65b-d21fe96a405b