`load` event only fires when readyState is 4. So you can safely remove this `if`.
You can handle errors by registering a `error` event listener.

See this note for more info about xhr load, error and readyState:
http://stackoverflow.com/questions/9181090/is-onload-equal-to-readystate-4-in-xmlhttprequest