Add nil check for type and name in DNS record