Context always matters (and of course, as I mentioned in another thread, code formatted text over screenshots).
The 2nd screenshot is the Update() method, which is actually called before the 1st paste, AttackBehaviour.
In the Update() method, youāre actualy checking the target twice, once at the beginning, and once in the range check. Since youāre blocking at the beginning of the method, no further null checks on Target are required for the remainder of the method (Unity is, by default, NOT multi-theaded). This means you can remove the target!=null from the if statment and simply use
if(!GetIsInRange(target.transform))
Theoretically, AttackBehaviour() is only called in Update(), and at the point that it is called, target has already been null checked. Your screenshot confirms 1 reference
⦠so theoretically, a null check is not required here.