Line validity check implemented