Added check for null pointer when cancelling creating a new Deck