I think you only need one check for accessList == null before calling trim(). Calling trim() on a string containing only whitespace characters or on an empty string returns empty string and not null. The following code:

```java
public class Foo {

	public static void main(String[] args) {
		String foo = "   ";
		System.out.println((foo.trim() == null));
		System.out.println((foo.trim().equals("")));

		String bar = "";
		System.out.println((bar.trim() == null));
		System.out.println((bar.trim().equals("")));
	}
}
```

prints:

```
false
true
false
true
```