isBasicObject check returns if null or undefined