Does this need a type check before casting to DocumentId?

Also this looks pretty standard, does Lombok provide an implementation, and if so is it usable for a GWT component like this?