Add a nil check in the ipv4 address check. (#380)
Add a nil check in the ipv4 address check. (#380)

* Add a nil check in the ipv4 address check. Sometimes in vsphere 6 the address setup on VMs is sluggish and the first address ends up being nil, this makes it so it doesn't crash testing if it's linklayer before it's fully initialized.

Signed-off-by: Scott Hain <54f99c3933fb11a028e0e31efcf2f4c9707ec4bf@chef.io>

* Move code to a method for clarity, per feedback

Signed-off-by: Scott Hain <54f99c3933fb11a028e0e31efcf2f4c9707ec4bf@chef.io>

swalberg/knife-vsphere,adamleff/knife-vsphere,chef-partners/knife-vsphere,ezrapagel/knife-vsphere,swalberg/knife-vsphere