I would probably use CRS.equalsIgnoreMetadata(crs, DefaultGeographicCRS.WGS84), as it would catch more variants of WGS84 (not just the one coming from the EPSG database)