Add guards against empty payloads
Merge pull request #2 from Meatballs1/psh_fix

Add guards against empty payloads