the two-part check can be simplified to "inString != null", but you already knew that :)