in fact this logic should be `if (isPrimitive(obj)) return;`, no need for `|| !obj`.