server-node: Added some checks to prevent errors when destroying modules
server-node: Added some checks to prevent errors when destroying modules

andersevenrud/OS.js-v2,andersevenrud/OS.js-v2,andersevenrud/OS.js-v2,andersevenrud/OS.js-v2,andersevenrud/OS.js-v2