If you call this function and the 3rd arg is a callback name, it will render JSONP automatically. Then you can get rid of this condition entirely.