isGraphEmpty realization added