Updated stopAdvertisingBeacon method to handle crash when calling it when not advertising or CBPeripheralManager is off