Take parameter if passed, otherwise just switch internal isOpen value.