I think that was the outcome of the discussion, and the whole purpose of this PR: if there is any nan, then the median is undefined and hence nan.