insert Either monad into typecheking Env state