fix "AttributeError: 'str' object has no attribute 'get'" and happier lint
set default for getattr
unhappy lint, happy salt.states.pkg
remove extraneous condition
Merge pull request #14769 from saltstack/bp-14715

Backport #14715 to 2014.7