You should cast to boolean, it's currently an integer. The doc block says it's a boolean