Not at all lol, re read the code you posted, it doesn't make sense to whois $2 if $2 doesn't 'exist'.
As to your original question, yes! Checking if the parameter is a channel doesn't make sense because indeed you cannot whois a channel, however, making a condition to finally doing the same thing is useless and that's a different thing, WorldDMT was pointing out that the same thing is done whatever the condition, he wasn't saying it doesn't make sense to whois a channel :p