Add check to getBufferOf in EnergyNetwork