Use salt[pillar.get] and do some sanity checking to avoid state failing if pillar data is missing entirely or incomplete

Fix mangled start of file

Use salt[pillar.get] and do some sanity checking to avoid state failing if pillar data is missing entirely or incomplete