added check_type()