code: public static boolean hasRecords(String hostName, String dnsType)
  			throws DNSLookupException {
  		return DNSLookup.doLookup(hostName, dnsType) > 0;
  	}
docs: Checks if a host name has a valid record.
  
  @param hostName
  The hostname
  @param dnsType
  The kind of record (A, AAAA, MX, ...)
  @return Whether the record is available or not
  @throws DNSLookupException
  Appears on a fatal error like dnsType invalid or initial
  context error.