We should check record type. Net::DNS says:
***
***  WARNING!!!  The program has attempted to call the method
***  "address" for the following RR object:
***
***  mail.etel.ru.      86400   IN      CNAME   email.etel.ru.
***
***  This object does not have a method "address".  THIS IS A BUG
***  IN THE CALLING SOFTWARE, which has incorrectly assumed that
***  the object would be of a particular type.  The calling
***  software should check the type of each RR object before
***  calling any of its methods.
***
***  Net::DNS has returned undef to the caller.
***