Fixing error with Java7 (compare method did not work for two nulls)