Area FISHING_AREA = new Area(x, x, x, x);
if (FISHING_AREA.contains(myPlayer()) {
NPC fishingSpot = npcs.closest("Rod fishing spot");
if (fishingSpot != null) {
fishingSpot.interact("lure");
ConditionalSleeepHere until interacting
}
}
will only search for the fishing spot if you're in the area you need to be. Also checks if it found the spot before interacting.
Basically just make sure that you interact only when you're sure that you have something to interact with