add some safety to the saltenv additions in the py renderer
Merge pull request #14366 from thatch45/develop

add some safety to the saltenv additions in the py renderer