Fixed bug in compare with NaN. Fixed tests. Added ability for select to choose objects and not just values.