compare values of diff types