Class.equals is safe, but Type.equals can be hazardous. Prefer Guava or other libraries' utilities for the equality check.