added checks for ipv4 addresses table and address value before calling t...

...hem.
Fix for issues 141 on luci-commotion.

https://github.com/opentechinstitute/luci-commotion/issues/141

To test:
1) Take an R1 node and restart networking and configuring all sorts of things until luci-commotion issue 95 appears. https://github.com/opentechinstitute/commotion-router/issues/95 This will break all the interfaces. 
2) scp over this modified header to replace the existing header file
3) remove the luci-cach's on the node.
4) refresh page 

If the page loads then this fix works.