You might come across a recipe which calls for the use of sweet apricot kernels, that differ from bitter apricot kernels, which are used as a flavoring agent in jams, candies, pastes, custards, and other baking applications. Europeans and others often use them to enhance jams and jellies, putting a kernel is each jar, which isn’t normally consumed. Italians crush them to make the famous Amaretti di Saronno cookies, and Asian markets stock them in their spice aisles.
Anything can be dangerous if used incorrectly; Vitamin A, eaten in very large quantities, can be toxic, some people consider MSG dangerous (others wonder why doesn’t everyone in Asia have a headache?), and parsley and chives contain small quantities of oxalic acid, the same thing that makes rhubarb leaves inedible.