type checking in statements