ENH: better handling of NaNs in logaddexp