handle channel being of type None