Implemented type checking for for construct