On the rigidity of black holes