Added type-checking decorator.
Added typechecking.