Could be worth adding an assertNonNull(Object, String) utility method for this.