Fix segfaults when 'default_type' is not defined