title: Object is possibly 'undefined' in Vuex mutation with TypeScript
body: <p>I'm learning Vue.js with Vuex and TypeScript, in the application i'm building i came across the error "Object is possibly 'undefined'" in the Vuex Store.</p>
  
  <p>The error happens in the "newCard" mutation in this line:</p>
  
  <pre><code>state.board.lists.find(list =&gt; list.id === idList).cards.unshift(card)
  </code></pre>
  
  <p>The complete store code:</p>
  
  <pre><code>const state: BoardState = {
    board: {
      id: "",
      name: "",
      idProject: "",
      closed: false,
      lists: []
    }
  };
  
  const getters: GetterTree&lt;BoardState, {}&gt; = {
    getBoard: state =&gt; state.board
  };
  
  const mutations: MutationTree&lt;BoardState&gt; = {
    setBoard: (state, board) =&gt; (state.board = board),
    newList: (state, list) =&gt; state.board.lists.unshift(list),
    newCard: (state, { card, idList }) =&gt;
      state.board.lists.find(list =&gt; list.id === idList).cards.unshift(card)
  };
  
  const actions: ActionTree&lt;BoardState, {}&gt; = {
    async fetchBoard({ commit }) {
      const response = await axios.post("https://app.fakejson.com/q", json);
      commit("setBoard", response.data);
    },
    async addList({ commit }, list) {
      const response = await axios.post("https://app.fakejson.com/q", {
        token: "oplF0L7vj1Ial4cRqtx9DA",
        data: list
      });
      commit("newList", response.data);
    },
    async addCard({ commit }, { card, idList }) {
      const response = await axios.post("https://app.fakejson.com/q", {
        token: "oplF0L7vj1Ial4cRqtx9DA",
        data: card
      });
      commit("newCard", response.data, idList);
    }
  };
  </code></pre>
  
  <p>TypeScript types:</p>
  
  <pre><code>// Store
  export interface BoardState {
    board: Board;
  }
  
  // Models
  export interface Board {
    id: String;
    name: String;
    idProject: String;
    closed: Boolean;
    lists: List[];
  }
  
  export interface List {
    id: String;
    name: String;
    idBoard: String;
    closed: Boolean;
    cards: Card[];
  }
  
  export interface Card {
    id: String;
    name: String;
    idList: String;
    closed: Boolean;
  }
  </code></pre>
  
  <p>The response data of the board state is like this:</p>
  
  <pre><code> {
     "id":"1",
     "name":"Tasks",
     "idProject":"1",
     "closed":false,
     "lists":[
        {
           "id":"1",
           "name":"To Do",
           "idBoard":"1",
           "closed":false,
           "cards":[
              {
                 "id":"1",
                 "idList":"1",
                 "name":"Card 1",
                 "closed":false
              },
              {
                 "id":"2",
                 "idList":"1",
                 "name":"Card 2",
                 "closed":false
              }
           ]
        }
     ]
  }
  </code></pre>