type checking case expressions, fixed bug in list type checking