Optimize error level filtering by usung bit comparison

Using bit comparison is a lot more efficient that `is_array`.