R Check If Variable Exists Python