fix: check if result.total is null.

if result.total is null, calculate the value
based on success + failure + skipped.