handle case where elem.name() === null
added known options to function documentation