      - parameter storeType: The store type to be used, you have .InMemory and .SQLite, the first one is memory
      based and doesn't save to disk, while the second one creates a .sqlite file and stores things there.
      */
-    @objc public init(modelName: String, storeType: DataStackStoreType) {
+    @objc public init?(modelName: String, storeType: DataStackStoreType) {
+        
+        guard let model = NSManagedObjectModel(bundle: self.modelBundle, name: self.modelName) else { return nil }
+        
         self.modelName = modelName
         self.storeType = storeType
-        self.model = NSManagedObjectModel(bundle: self.modelBundle, name: self.modelName)
+        self.model = model
 
         super.init()
     }


    // Drops the database.
    @objc public func drop(completion: ((_ error: NSError?) -> Void)? = nil) {
        self.writerContext.performAndWait {
            self.writerContext.reset()

            self.mainContext.performAndWait {
                self.mainContext.reset()

                self.persistentStoreCoordinator.performAndWait {
                    for store in self.persistentStoreCoordinator.persistentStores {
                        guard let storeURL = store.url else { continue }
                        try! self.oldDrop(storeURL: storeURL)
                    }

                    DispatchQueue.main.async {
                        completion?(nil)
                    }
                }
            }
        }

     Initializes a DataStack using the provided model name.
     - parameter modelName: The name of your Core Data model (xcdatamodeld).
     */
    @objc public init?(modelName: String) {
        
        guard let model = NSManagedObjectModel(bundle: self.modelBundle, name: self.modelName) else { return nil }
        
        self.modelName = modelName
        self.model = model

        super.init()
    }
