to check the type of the second argument before calling char-equal. Spotted by William H. Newman, fix from Peter Van Eynde.