function statusValid(xhr) {
  try {
    var status = xhr.status;
    return status !== null && status !== 0;
  } catch (e) {
    return false;
  }
}
Checks if xhr.status is readable and non-zero, indicating no error.
Even though the spec says it should be available in readyState 3,
accessing it throws an exception in IE8