fix #530 by relaxing type constraint checking on types that appear in
is conditions (we can relax more syntactic positions later)