Style: always use braces in if, even if just one line.

Logic: Don't accept null here silently. Throw an exception. You can use Validate.notNull() for this.