Check if constant is defined before using