Python Detect If Variable Exists