ismasan/oat — pull request #3 by shekibobo (2014-01-10 17:30:23+00:00)
Title: Don't try to serialize nil with an entity serializer

If the entity (such as a reference to another object) is nil,
the `entity` method will still try to serialize nil using the
passed in block or serializer class, which will often raise a
`NoMethodError` on `nil`.

Here, we don't try to serialize unless the item actually exists
to serialize it, otherwise we return nil.