Added these prior to the type equality check to allow mismatched types (except for unsigned long and long since these can't be compared in all cases without casting up to long long)