fix comparison of constants to None