Add type checking.
Move plus function tests to separate test case file and add error test cases.