This check was in the master copy too, but -- is it ever actually possible for `stat` to be null when there's no err?