Type checking the environment