Slight refactor of checking for blank strings and strings with only a carriage return using rstrip