Function to compare types for overload closeness