It's definitely safe to eat mug cakes, assuming you cook them long enough so that they're baked through. If the top of your apple pie mug cake is dried out, then it's done cooking and ready to eat!