changing get_nearest to not use a stream
adding new tests for get_nearest().type_of()