Added some type checking
more type checking
Merge branch 'master' of github.com:em-mo/TDDB44