[Resolver] Fixed null-ref when visiting if-statements