Fixed to check if encounter role name is not null empty or whitespace.