Added the SafeDefine() function to safely define a constant without throwing a notice.