code: function hasModule (name) {
      // throw error on invalid name
      requireValidName(name)
      // check if module exists
      return defined(immutable.modules[name]) ? true : false
  }
docs: @function hasModule
  
  check if module exists.
  
  throws error on invalid mdoule name.
  
  @param {string} name - name of module
  
  @returns {boolean}
  
  @throws {Error}