Checking line[0] exists

Fixes PHP Notice:  Undefined offset: 0 in ...