Should we do nil check for non optional variables : I have a function abc as follows and I should throw an error when the arguments passed are empty of nil,, should I check for nil too? or only empty is enough ?

    public func abc(forURL serviceUrl:String,serviceID:String, error:inout Error? )throws ->[AnyHashable : Any]{
            guard serviceUrl != nil, !serviceUrl.isEmpty else {
                let argError:Error = MapError.emptyArgumentUrl.error()
                error = argError
                throw argError
            }
            guard !serviceID.isEmpty else {
                let argError:Error = MapError.emptyArgumentServiceId.error()
                error = argError
                throw argError
            }