Implement type checking on let expression