defensively check for nil, although that should never happen