Added missing isEmpty method.