Fix: isEmpty() now tests objects correctly