I was thinking along the lines of jquery's `dataType` parameter: http://api.jquery.com/jQuery.ajax/. It defaults to an intelligent guess, and I see that it'll actually throw an error if the JSON fails to parse. Maybe we should return null here...