Implementation for isAmbient