added check_userdata()