Implement more robust checks for trivial context conditions