i think it makes more sense to throw an error to be more like JSON.parse