Add argument checking in addLine()