Added isSandbox check around the __toString check in Sandbox

The `__toString` policy check currently still happens when the sandbox is disabled