Updated Repository._find_by_attribute to handle the case where the data store returns an array with a nil element in it.