Use NXDOMAIN exceptions to the reduce number of unnecessary queries for performance improvement. Fix copy & paste bug.