Check OnTrigger for component

Hi
I need to check my OnTriggerEnter thing if it contains the script “PhysicsGround.cs” and then take the gamobject that I collided with and assign it to a varieble.

Please help and excuse my bad english.

function OnTriggerEnter(other : Collider) {

    var pg = other.GetComponent(PhysicsGround);
    if (pg != null) {
        // Do whatever when there is a PhysicsGround component
        //  'other.gameObject' will be the game object to save
    }
}