how to fix "Cannot read property ‘length’ of null" in Angular’s HttpHeaders

I want to send a request to Odoo API using angular7-odoo-jsonRPC but every time i try to login an error occurs that says “Cannot read property ‘length’ of null”

I logged to the console the HttpHeaders object and this is the result:

HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}
lazyInit: () => {…}
lazyUpdate: null
normalizedNames: Map(0) {}
__proto__: Object

when i debugged using chrome dev tools and breakpoints i found that http.js file has this condition :

if (values.length > 0) {
                        this.headers.set(key, values);
                        this.maybeSetNormalizedName(name, key);
                    }

and when this condition apply to lazyUpdate, the error occurs,
How can i solve this issue

Source: New feed
Source Url how to fix "Cannot read property ‘length’ of null" in Angular’s HttpHeaders