Avoid empty error event when responseText is empty

Using statusText or status when responseText is empty in onreadystatechange