Check if active is defined before executing onhit/buff actives

Honestly lobotomize should set cast to 0, but this way makes it so nothing else will cause these issues either