I think you can just write this as:
    
     if email.contact_type && email.contact_type.name.present?