function checkAnimation(animation, queueName, defaultQueue, isPaused) {
    if (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {
        if (isPaused) {
            animation._flags |= 16 /* PAUSED */; // tslint:disable-line:no-bitwise
        } else {
            animation._flags &= ~16 /* PAUSED */; // tslint:disable-line:no-bitwise
        }
    }
}
Check if an animation should be paused / resumed.