2618. Check if Object Instance of Class
https://leetcode.com/problems/check-if-object-instance-of-class
Javascript
var checkIfInstanceOf = function (obj, classFunction) {
if (obj === null || obj === undefined || typeof obj == null || typeof classFunction !== 'function') {
return false
}
return Object(obj) instanceof classFunction
};