# MLJ compain TypeError: non-boolean (Nothing) used in boolean context

**URL:** <https://discourse.julialang.org/t/mlj-compain-typeerror-non-boolean-nothing-used-in-boolean-context/79844>\
**Category:** General Usage\
**Tags:** question, mlj\
**Created:** [April 22, 2022, 2:17pm UTC](https://discourse.julialang.org/t/mlj-compain-typeerror-non-boolean-nothing-used-in-boolean-context/79844 "2022-04-22T14:17:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiZ](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tiz/32/211800_2.png) [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Post date:** [April 22, 2022, 2:17pm UTC](https://discourse.julialang.org/t/mlj-compain-typeerror-non-boolean-nothing-used-in-boolean-context/79844/1 "2022-04-22T14:17:27Z")

</div>

Hi, I have trouble in understand the error while I do the model evaluate in MLJ package.

I could run succussful with Accuracy or MulticlassFScore measures, but if I add the confusion\_matrix measure as below, it will pop an error said: `ERROR: TypeError: non-boolean (Nothing) used in boolean context`; But I have no idea where is wrong.

My code is here

```julia
# scitype for X is Continuous, for y, it is AbstractVector{OrderedFactor{2}}
mach = machine(svm(), X, y) 
evaluate!(mach,
                 resampling=CV(nfolds=5),
                 measure=[Accuracy()])

evaluate!(mach,
                 resampling=CV(nfolds=5),
                 measure=[ConfusionMatrix()])

```

Thanks for any suggestion!
