Refactoring of  IsEmpty method

Removed IsNotEmpty method and used the IsEmpty method.