The sensors detect electrical capacitance, if I remember correctly. Most animals have some of that, even in their beak!
Of course, the closer the birds head is and for a longer time, if more effective is its tapping. It might have better luck by almost touching its eye/head on the screen.
I suppose its safe as long as the bird has recently disposed of any unwanted materials.