Pull stubbed API check into a variable because of code obfuscation problems