How do i read the state of an enumurator on another object?

I have an enumerator attached to the “other” object. How you i check its type then choose an outcome based on the result?

this is the script on the player.

void OnTriggerStay(Collider other)
{

		foreach(GameObject weapon in weapons)
		{
			if (other.gameObject == weapon)
		{
				var thistype = other.GetComponent<WepType>();
				
			
			if(Interact == true && equipped == false && CurrentWeapon == null)
			{
					if(thistype)
					{
					

					}
					if(thistype)
				{
				
				CurrentWeapon = weapon;
				CurrentWeapon.rigidbody.isKinematic = true;
				var PChand = transform.Find ("HandL");
				var otherT = other.transform;
				otherT.transform.parent = PChand;
				otherT.transform.localPosition = Vector3.zero;
				otherT.transform.localRotation = Quaternion.identity;
				otherT.transform.Rotate (90,0,0);
				if(PChand = null){Debug.Log ("CANT FIND BONE");}
						equipped = true;
				}


				Debug.Log("interacted") ;

			}
			if(CurrentWeapon != null){Debug.Log ("You are already holding a weapon!");}
			
		    Debug.Log("Weapon contact");
		
		}



	}

this is the enum script attached to the “other” object.

public class WepType : MonoBehaviour


{
    public enum Weapontype
	{
		NONE,
		Sword,
		Gun,
		Axe,
		Dagger,
		Bow
	}

	public Weapontype type = Weapontype.NONE;


	}

You can check for it’s value based on simple comparison.

if(Interact == true && equipped == false && CurrentWeapon == null)
{
    if(thistype.type == Weapontype.NONE)
    {
        // Code if no weapon.
 
    } else if (thistype.type == Weapontype.Bow)
    {
        //  Code if bow.
    }

    // Rest of code..

}