check for interfaces with no IP. fixes #201

Check if a regex match has occurred before trying to use the captured data.

#201 was introduced by a refactoring commit, b604a32ca740079d0b4d7c120f657772d28fd028, which reduced some duplication but didn't account for the old function's checking for regex matches. 

Prior to that commit, the new functions had only been used on interfaces that were known to have IPs.

This PR adds error checking to the new functions.