*: Compare integers by == or != instead of by `is` or `is not`

Same logic as in previous patch. Suggested by @jeorme in
!122 (comment 193062) .

/suggested-and-reviewed-by @jerome
/reviewed-n !122
1 job for master in 0 seconds
Status Job ID Name Coverage
  External
passed SlapOS.Eggs.UnitTest-Master.Python3

00:14:30