added some error checking to getLine, 'checkType' is under construction