Fix issue with iterating over None
Fix issue with iterating over None

Sometimes DnsNamesList is None or not present. It was stacktracing while
trying to iterate over it. Now it checks for non iterables.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt