     getParticipants: (id) ->
       Promise.resolve()
       .then =>
+        validateId(id)
         @storageClient.getObjectMetadata(id)
       .then (metadata) ->
         usernames = _.chain([metadata.owners, metadata.readers, metadata.writers])


      Promise.resolve()
      .then =>
        @getParticipants(id)
      .then (current) =>
        usersAdd    = _.difference(@users, current)

  SharingClient = require 'kryptnostic.sharing-client'

  log = Logger.get('PermissionChangeVisitor')

  validateId = (id) ->
    unless _.isString(id) and not _.isEmpty(id)
      log.error('illegal id argument', {id})
      throw new Error 'illegal id argument'

  #
  # Changes permissions on the visited object nodes.
