Fixed the cancel exception thread, and made .length checker work

added !null and few lines of code