Added typeCheck