Add/better checks

sigh, mootools overrides `window.JSON = { stringify: fn, parse: fn } -> window.JSON = { encode: fn, decode: fn }`cc @calvinfo