Added testMethod, checkType, and stringifyObj, for library testing.