Array comparison
Array to null comparison + handle not defined as not comparable
code cleanup
new compare function