Added validation to todo items