Error handling for PTR lookup