If a smaller and simpler library is required see big.js. It's less than half the size but only works with decimal numbers and only has half the methods. It also has fewer configuration options than ...
Unfortunately, JavaScript does not provide convenient methods or helper functions to check a value's type. The mechanisms in place that could be a de facto way of doing it can have misleading results ...