How to get skeleton associated with an animation blueprint in a blueprint

I have a character blueprint where the skeletal mesh and animation blueprint will be set by the player. I want a way to compare the skeleton associated with the skeletal mesh vs the skeleton associated with the animation blueprint. Is there any way in blueprints to find/get the skeleton associated with an animation blueprint?