python test if input is string