I think it should be: 
```java
if (input == null || input.size() == 0) return null;
```