Updated addTask method to check for Id