Fix _get_type functions to return a number (instead of an object).