`getId` might return `null`, pleas deal with this situation.