added check_type