Convert IsChannel to use std::function.