Compare works for both types