Safety condition detection