In a region with no "Dwarf" NPCs...
getNpcs().closest("Dwarf").interact("Attack");
Result: (bot also freezes)
getNPCFinder().findClosest("Dwarf").attack();
Result:
Nothing, because it's handled.
You shouldn't be returning null for anything (I know this isn't related directly to the interaction method, but it's a fair point), the code for both methods listed is perfectly valid and thus should work no matter what, right? Returning null is also known as the billion dollar mistake, and is for a good reason. NPCFinder will return an instance of omniapi.data.NPC no matter what, whereas NPCS will return either an instance of org.osbot.rs07.api.model.NPC or null. We shouldn't need to null check things like this. In fact, the api docs even states it returns the closest generically specified Entity - mentions nothing about null.
Also, the NPC #closest() methods don't even return the correct closest NPC (even though it should be using Pythagoras' algorithm). I've highlighted this in a thread, which you have likely not read yet, and NPCFinder accounts for this.
Wrapping around IE is temporary, it's there to show it works and I will be writing a custom interaction method very soon.