pigjar-67 Defensive programming review.
Merge pull request #71 from trin5tensa/pigjar-67

pigjar-67 Defensive programming review.