more convinient check for context