Service Dialog Element Type tests

Do you think this function could be refactored/shortened?

Please, get rid of the parentheses in `if` statements.