You should use `is_Rational` (with a capital `R`).  Otherwise, this will work with something like `Symbol('a', rational=True)`, which we don't want.