Fix for missing 'reason' elements

If the 'reason' element is missing, the content and empty methods fail.
Instead check to see if reason is nil.
Merge pull request #1 from nine9ths/master

Fix for missing 'reason' elements