Repository#_find_by_attribute to handle the case where the data is nil

Updated Repository._find_by_attribute to handle the case where the data store returns an array with a nil element in it.

Background:
We came across cases where a nil element is returned when Repository#_find_by_attribute is called. We believe this has to do with the fact what we have tombstones in our Riak store. We added a nil check before trying to access [:key] and [:data] to prevent an exception from being thrown.