fixed isEmpty bug returning true on a number