Added example for ill-typed variable

  - Improved error messages