Throw an exception if you can't serialize