Check if Blueprint is being run within the editor (i.e if WITH_EDITOR in C++)

Is there a better way in C++? WITH_EDITOR is not enough