Is there a way to know if the Devil Spirit is equiped?

I want to use devil spirit skill, but bot crashes if devil is not equiped or death, so, I want to know if there is a way to know if the devil is equiped or death.

Check Inventory Avatar tab

I need to do it automatically not manually

I have no idea about that.