If the list is null, trying to add an item onto the list will result in the Null pointer error you are getting. To fix this, you need to initilize the cards object like so:
cards = new List();
cards = new List();
cards.add(card);
List<Card> cards = new List();
ArrayList<Card> cards = new ArrayList<Card>();