export function safelyAccessDocument(_document) {
    return _document || (typeof document !== 'undefined' ? document : null);
}
export function safelyAccessDocumentEvent(event) {
    return !!event &&
        !!event.target &&
        typeof event.target === 'object' &&
        'ownerDocument' in event.target
        ? event.target.ownerDocument
        : null;
}
