Cannot read properties of undefined (reading 'toLowerCase')

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at ieCheck (/var/app/current/app.js:124:76)
    at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/var/app/current/node_modules/express/lib/router/index.js:328:13)
    at /var/app/current/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/var/app/current/node_modules/express/lib/router/index.js:346:12)
    at next (/var/app/current/node_modules/express/lib/router/index.js:280:10)
    at /var/app/current/node_modules/express/lib/router/index.js:646:15
    at next (/var/app/current/node_modules/express/lib/router/index.js:265:14)
    at Function.handle (/var/app/current/node_modules/express/lib/router/index.js:175:3)
    at router (/var/app/current/node_modules/express/lib/router/index.js:47:12)