If I am not mistaken since the permission is just a bit mask guaranteed to have a single bit marked you can just do != 0 instead.