#10 made compareTo null safe