HCOLL-89 reduced repeated instanceof check