python check if input is string