this method does not verify for the pattern to be empty. After checking if the pattern is a String, simply delegate into StringUtils.isBlank(String)