Bug fix for attempting to build a Document with nil for attributes

# Why?
See https://github.com/RevSpringPhoenix/arkenstone/pull/72

# What changed?
See https://github.com/RevSpringPhoenix/arkenstone/pull/72
NOW WITH TESTS!