Added safeguards

- Only add the “nodeContent” key if “currentNodeContent” is not nil.
- Only add the “raw” key if “rawContent” is not nil.
Merge pull request #41 from premedios/master

Added safeguards