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.


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/12@410274 f38db490-d61c-443f-a65b-d21fe96a405b