Why is this an issue?

The TObject.Free method already performs a nil check before freeing. Additional checks are redundant.

How to fix it

Remove the nil check:

if Assigned(Foo) then begin
  Foo.Free;
end;

if Bar <> nil then begin
  FreeAndNil(Bar);
end;
Foo.Free;
FreeAndNil(Bar);

Resources