"Accessed none trying to read property" keeps showing despite everything works fine (SOLVED)

So, I was going to make a small diegetic popup menu whenever a player clicks on a certain actor of class and make it disappear when a player clicks on another actor of the same class.
I made the following script which is the only way to make it work I came up with:


And despite everything working just like it should, the error keeps showing.
How can it be fixed?

What is the actual error message?

Well, it couldn’t read the property of GetActorOfClass node.
I solved the problem when I found out I placed GetActorOfClass node after IsValid node.
Guess I’m just a dumbass.