Add some rudimentary checks to test that source is either a string or an ArrayBuffer/View.