function ensureTodo(req, res, next) {
    assert.arrayOfString(req.todos, 'req.todos');

    if (req.params.name && req.todos.indexOf(req.params.name) === -1) {
        req.log.warn('%s not found', req.params.name);
        next(new TodoNotFoundError(req.params.name));
    } else {
        next();
    }
}
Simply checks that a todo on /todo/:name was loaded.
Requires loadTodos to have run.