clean up unneeded check for null pointer exceptin.
swap equals call to compareTo method call