Certified GKH Gardening Expert
According to the University of California, yucca plant is safe around pets and humans as far as ingesting plant parts.
Some varieties have sharp spikes so you may want to avoid those. Other than that, site your yuccas in full sun and dry areas.
Here is information on varieties of yucca: