Checks if a morphism is an endomorphism.