a mean robust to nan's and inf's