Drop some exception The API does not clearly describe wether this can be null or not. Even if, a NPE would be appropriate. At at the end, an null value will fail with an NPE.