Fix comparison of int and None