Casting in blueprint

That error means that the variable is null. To avoid the error you can use an Is Valid node in your BP. That way when it really doesn’t have a reference it will not throw an error.