Add math.isnan() check before math.isfinite() to properly catch
NaN values in weight totals. Prevents division by NaN which could
produce unexpected results in RRF fusion calculations.
Solution-ID: SOL-20251228113631
Issue-ID: ISS-1766921318981-0
Task-ID: T1