Adding isActive() method.