FIX: More explicit checking of ch_type