Licking is safe. Depending on the context it can mean exploring/tasting (especially salt on your skin from sweating), cleaning, healing or affection.
Piggies cannot be potty trained. They can have preferred toiletting corners but will also pee when sleeping. Poos are produced in such amounts that they are often dropped all over the place. Especially piggies from less than ideal conditions may have never learned any sanitary habits from their elders.