Check if a script is attached to a valid entity

It seems like after referencing a script and destroying its entity, there is no good way to check if the scripts entity is valid. Using script:GetEntity():IsValid() will throw an error.
The only way to check it is to check for script.__OWNER which is unsafe.