check for addr before evaluating it,  e.g. tun type interfaces

Currently this tries to evaluate addr for all interfaces and this may not be appropriate, for instance when running openvpn on Ubuntu it fails on the resulting tun interface.  This just checks that addr exists before getting the pfamily property.  Tested on Ubuntu 12.04 and 14.04.