Moved line 103 to give purpose to do/while loop's null check.