You can simplify this to this.namespace = checkNotNull(namespace)