proxy.trim().isEmpty() would be more clear (no need to ignore case and it is faster than equals).