added a check to make sure the loaded modules actually returned a value before adding them to the module index
fixed typo and simplified test for valid davejs modules