fix(filter): Only perform circular reference check on non-primitive types