Add:
```java
if (bitmap == null) {
  throw new NullPointerException("bitmap");
}
```