JS error when defining a prototype method – V[a].exec is not a function [duplicate]

I defined the following method. But before I want to call method somewhere, I’m getting a Jquery error.

Object.prototype.getType = function () {
    return (typeof this.valueOf());
};

Console:

jquery.min.js:2 Uncaught TypeError: V[g].exec is not a function
    at ga.tokenize (jquery.min.js:2:19325)
    at ga.select (jquery.min.js:2:22349)
    at Function.ga (jquery.min.js:2:7308)
    at Function.a.find (jquery-migrate.min.js:2:1675)
    at r.fn.init.find (jquery.min.js:2:24958)
    at a.fn.init.r.fn.init (jquery.min.js:2:25448)
    at new a.fn.init (jquery-migrate.min.js:2:1276)
    at r (jquery.min.js:2:601)
    at jstree.min.js:2:247
    at jstree.min.js:2:165