Fix in if type check, checks for NULL
Merge branch 'master' of github.com:em-mo/TDDB44