No need to check for detachment when writing in kryo because the serializer already handles it.