fixed check_raw_ptr returning type