The UN is taking steps to avoid the kind of scenarios that have fueled science fiction nightmares for years.