Trouble with accessing scriptable object inside another scriptable object

Currently tying to look inside the attachedSO to make a match but cant access the other scriptable details.

Basically character scriptable object with a scriptable object for the type of character;

public class CharacterSO : ScriptableObject
    {
        public Sprite CharacterSprite;
        public string CharacterName;
        public CharacterTypeSO CharacterType;

        private void OnEnable()
        {
            CharacterName = this.name;
        }
    }

I can check if its a character with this but cant find how to also check that its say an Admin CharacterType;

private ScriptableObject soObjectToMatch;

 public void OnDrop(PointerEventData eventData)
        {
            Debug.Log("DropHandler");          
            var attachedSO = eventData.pointerDrag.GetComponent<AttachedSO>().scriptableObject;
          
            if (eventData.pointerDrag != null && attachedSO == soObjectToMatch)
            {
                Debug.Log(soObjectToMatch + " Dropped here");
            }
            else
            {
                Debug.Log(soObjectToMatch + " Dropped in wrong place");
            }
        }

ok found solution by casting the attachedSo to the type I wanted to check for.CharacterSO attachedSO = eventData.pointerDrag.GetComponent<AttachedSO>().scriptableObject as CharacterSO;

I then had access to the data.