Adding typechecks