BACKLOG-5168: Improve empty param test to see if it has to be escaped