Update Objects.java

Fixes getNearest so it returns a null if no matches are found.