It's safer to keep out of it (6)

I believe the answer is:
danger
'out of it' is the definition.
The definition and answer can be both acts as well as being singular nouns.
Perhaps you can see a link between them that I can't see?
I cannot understand how the remainder of the clue works.
Can you help me to learn more?
(Other definitions for danger that I've seen before include "Ranged about in some peril" , "Peril, hazard" , "Menace" , "Peril, threat" , "Peril in garde" .)
