fixed isEmpty. null should return true.