checks if item is a record with keys, i.e. an object that is neither null nor an array
item
null
isObjectOrArray to allow arrays as well
checks if
itemis a record with keys, i.e. an object that is neithernullnor an array