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.