stop emitting warning about undefined variable $1 in the case of no leading text to trim from a line (i.e. $type is empty and there is no leading whitespace)