Environment check added to type checker
if statement bug fixed