modified todolist and todoitem models to validate title and foreign keys