code: protected <T> byte[] encode(T object) {
      return object != null ? serializer().encode(object) : null;
    }
docs: Encodes the given object using the configured {@link #serializer()}.
  
  @param object the object to encode
  @param <T>    the object type
  @return the encoded bytes