Added Network validity check