Add checks before using the testing scope