This change prevents sortBy from breaking

 This change prevents sortBy from breaking during sorting objects by key when there is an null element on array.