Don't segfault if the user provided a channel variable to use that doesn't exist.
Don't try to get the channel if the session is null.