extract undefined check to before first function
Merge branch 'master' of https://github.com/dansteen/libRTMTasker