Mostly working type checking.