containerOrNil template class