compatutility: Fix check_type.