Fix Python 3 syntax warning (is vs ==)