Check type in classify().