public void printDog() {
        for (Pet temp : list) {
            try {
                if (temp instanceof Dog) System.out.println(temp.getName());
            } catch (NullPointerException ex) {
                System.out.println("- Empty");

            }
        }
    }