Add XHR existence check