Looking at the code that calls this, type does get to be each of string, int and real; which is (somewhat rashly) not checked until BuildLineArray() has returned.  So yes, please, restore the type-sensitive handling of the data (weird though it is).