Buffer is not valid within the browser, so the availability must be checked before.
Allow the serialization of an instance of an object