added JavaDoc for isEmpty methods
added isEmpty tests