Compare object equality on attributes