         idWithPrefix = "#{@_keyPrefix}#{id}"
 
         afterValidate = (error = null) =>
-            return callback(error) if error
+            return callback(error) if error?
 
             if match and @_validate?
                 matched = @_validator.match data

            @_addLastUpdate data

            @_dataSource.bucket.replace idWithPrefix, data, options, (error, result) ->
                return callback error if error
                return callback null, result

        if validate and @_validate?

        idsWithPrefix = []
        idsWithPrefix = ("#{@_keyPrefix}#{value}" for value in ids)
        @_dataSource.bucket.getMulti idsWithPrefix, (error, result) ->
            return callback error if error? and !_.isNumber error
            return callback null, result

    # Remove a single record using the primary key
