handle nulls in compare (still wrong potentially)