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