More typecheck fixes. And a temporary fix for memoization of true-val and false-val. Once we fix object and int to be py files, this shouldn't be necessary anymore.