Learn Courses My Dashboard

Why is this returning nil

Hi, this code is returning nil always. So frustrating!

let today = Date()
                        let calendar = Calendar(identifier: .gregorian)
                        let components = calendar.dateComponents([.weekday], from: today)
                        let nineThirtyToday = Calendar.current.date(
                          bySettingHour: 90,
                          minute: 30,
                          second: 0,
                          of: today)
                        print(nineThirtyToday as Any)
                        if components.weekday == 4 {
                            if today <= nineThirtyToday! {
                                if UDM.shared.widgetDefaults?.value(forKey: "currentRiddle") as! String == currentRiddleFinal {
                                    currentRiddleFinal = "Waiting for update from server"
                                }
                            }else {
                                print("Not Nine Thirty")
                            }
                    }
                        UDM.shared.widgetDefaults?.setValue(currentRiddleFinal, forKey: "currentRiddle")
                        print("Current Riddle: \(currentRiddleFinal)")
                    }

Thanks in advance!