   }
 
   public func deleteDatabase() {
+    guard LiveStreamService.getAppInstance() != nil else { return }
     LiveStreamService.firebaseApp()?.delete({ _ in })
   }
 

    guard let app = self.firebaseApp() else { return nil }
    return FIRAuth(app: app)
  }
}

  }

  private static func firebaseApp() -> FIRApp? {
    guard let app = self.getAppInstance() else {
      self.start()
      return self.getAppInstance()
    }

    return app
