Remove unneeded condition

`identity` can not be None as it is declared directly above.