check if obj is a Record, which is any non-nullable object that isn't an array; kind of like a dictionary.