Custom Requires Param for app state checking?

So normally Id check for an app’s state by looking at the registry and adding logic to handle exceptions but I wondered if there was a function that was a little bit more specific like #requires that can handle this for me?