Patients must have tumors determined to be easily accessible for biopsy (e.g. pleural-based lesions, peripheral lymph nodes, soft tissue metastases, large liver metastases, etc) At the point when tumor biopsies become mandatory (expansion phase only), disease amenable to biopsy and willingness to undergo biopsies or patient will be undergoing a procedure due to medical necessity during which the tissue may be collected, or tumor biopsy tissue from a previous research study or medical care is available for submission at registration; criteria for the submission of tissue are:* Tissue must have been collected within 3 months prior to registration* Patient has not received any intervening therapy for their cancer since the collection of the tumor sample* Tumor tissue must meet the minimum requirements outlined Tumor GANQ, GNA11, and BAP1 mutational status must be determined on all patients; if initial testing is performed locally or not available, MSKCC or Columbia University Medical Center (CUMC) patients must consent to provide a tumor block or unstained slides to MSKCC or CUMC for central review of mutational status; if tissue is not available, a pre-treatment biopsy will be necessary for eligibility * Patients enrolled at Vanderbilt University Medical Center may have GNAQ and GNA11 mutational status determined on a Clinical Laboratory Improvement Act (CLIA)-approved assay at Vanderbilt University Medical Center, CUMC, or MSKCC; tissue must be sent to MSKCC for BAP1 mutational status determination* The determination of mutational status may be performed retrospectively and will not delay patient treatment on study as long as tissue is available for molecular analysis SPECIMEN SUBMISSION AND SUBSTUDY CRITERIA Candidate for and willingness to have a surgically placed intraperitoneal catheter and tissue acquisition at the time of port placement; note: if an intraperitoneal catheter is already in place, a tumor biopsy will still be required; a guided core-needle biopsy is sufficient in these cases Willingness to provide blood and urine samples, and biopsy samples if on the expansion phase of the study, for research purposes; for the expansion cohort, patients must have tumor amenable to biopsy (excisional or incision biopsies of skin or head and neck [H & N] lesions under visualization) and willingness to undergo a tumor biopsy or patient will be undergoing a procedure due to medical necessity during which the tissue may be collected, or archival tumor biopsy tissue from a previous research study or medical care is available for submission at registration; criteria for the submission of archival tissue are:* Tissue must have been collected within 3 months prior to registration* Patient has not received any intervening therapy for their cancer since the collection of the tumor sample* Tumor tissue must meet the minimum requirements Patients must have measurable disease or evaluable disease for the escalation phase; for the 6 additional patients enrolled at maximum tolerated dose (MTD) for further evaluation of pharmacokinetic (PK) and pharmacodynamic (PD) endpoints (Expansion Arm A), for the 6-patient breast cancer gene (BRCA)-mutation expansion arm, patients must have measurable disease; however, tumor biopsies are optional; for Expansion Arm B, patients must have tumor amenable to biopsy (excisional or incision biopsies of skin or head and neck [H & N] lesions under visualization) and willingness to undergo a tumor biopsy or patient will be undergoing a procedure due to medical necessity during which the tissue may be collected, or tumor biopsy tissue from a previous research study or medical care is available for submission at registration; criteria for the submission of tissue are:* Tissue must have been collected within 3 months prior to registration* Patient has not received any intervening therapy for their cancer since the collection of the tumor sample* Tumor tissue must meet the minimum requirements TUMOR BIOPSY SEQUENCING: Patient must have tumor amenable to percutaneous or excisional skin biopsy and be willing to undergo a tumor biopsy or biopsy samples (formalin-fixed paraffin-embedded [FFPE] blocks) collected on another study or from a procedure performed due to medical necessity may be acceptable if collected within 6 months prior to registration on MPACT and providing that the patient has not received any investigational or targeted treatment since that time TREATMENT: Patient must have predefined targeted mutation in tumor biopsy Patients with cutaneous or superficial lesions that do not require imaging guidance for biopsy must be willing to undergo biopsies for tissue submission and blood draws for translational medicine All patients will be previously or simultaneously enrolled in the natural history ECD protocol #11-HG-0207, Clinical and Basic Investigations into Erdheim Chester disease; eligible patients must have been diagnosed with Erdheim Chester disease, confirmed by pathological evaluation of the affected tissue with adequate staining; affected tissue must harbor the BRAF V600E or V600K mutation Tissue availability for programmed cell death ligand 1 (PD-L1) expression is mandatory for enrollment; however if archived tissue is unavailable the patient will be given the option to consent to pre and post treatment tissue biopsies; tissue biopsies will be collected pretreatment (prior to the first dose of therapy) and post treatment (after at least 1 dose, preferably 2 doses of nivolumab) Patients must have adequate tumor tissue to meet the minimum requirement for submission Enrolling institutions are reminded that submission of pre-treatment serum, tumor tissue and whole blood is required Patients enrolled at sites participating in the Repeat Biopsy Study must agree to submission of tissue obtained by a repeat biopsy performed at the time of disease progression Patients must meet one of the following criteria:* Patients must have tumor amenable to image guided or direct vision biopsy and be willing and able to undergo a tumor biopsy for molecular profiling; patients with multiple myeloma other than plasmacytomas are to have a bone marrow aspirate to obtain tumor cells; biopsy must not be considered to be more than minimal risk to the patient** NOTE: Registration to screening steps (Step 0, 2, 4, 6) must occur after stopping prior therapy; there is no specific duration for which patients must be off treatment prior to registration to the relevant screening step (and subsequently, the biopsy), as long as all other eligibility criteria are met OR* Patient will be undergoing a procedure due to medical necessity during which the tissue may be collected** NOTE: Registration to screening steps (Step 0, 2, 4, 6) must occur after stopping prior therapy; there is no specific duration for which patients must be off treatment prior to registration to the relevant screening step (and subsequently, the biopsy), as long as all other eligibility criteria are met OR* Formalin-fixed paraffin-embedded tumor tissue block(s) are available for submission following pre-registration (not applicable for bone marrow aspirate specimens); criteria for the submission of formalin-fixed paraffin-embedded (FFPE) tissue are:** Tissue must have been collected within 6 months prior to pre-registration to Step 0*** Patient may receive treatment after tissue collection; however, lack of response must be documented prior to Step 1; the following restrictions apply:**** Enrollment onto another investigational study is not permitted**** Intervening therapy that constitutes a new, molecularly targeted therapy is not permitted; please note, immunotherapy is not considered molecularly targeted***** Continuation of an agent/regimen for which disease progression has been observed prior to biopsy is permitted, including targeted therapy**** A new immunotherapy regimen is permitted; but, lack of response must also be documented prior to registration to Step 0** Formalin-fixed paraffin-embedded tumor tissue block(s) must meet the minimum requirements OR* Results from one of the designated outside laboratories indicate a rare variant that is an actionable mutation of interest (aMOI) for specific designated rare variant subprotocols; the following requirements apply:** The outside laboratory notified the site that patient may be a potential candidate for MATCH due to a detected rare variant** Patients with an applicable rare variant must be able to meet the eligibility criteria for the appropriate subprotocols within 4 weeks following entry on the EAY131 Step 0 screening step** Registration to Step 0 must occur after stopping prior systemic anti-cancer therapy; there is no specific duration for which patients must be off treatment prior to registration to Step 0, as long as all eligibility criteria are met*** NOTE: Other potential aMOIs that would be eligibility criteria for NON RARE arms, as determined by the above laboratories, are not applicable for direct treatment assignment on MATCH*** NOTE: Tumor tissue for the confirmation of rare variant by the MATCH assay is to be submitted, preferably from the same time of collection as that evaluated by the designated outside laboratory Patient must have adequate tumor specimen available for submission Patient must have an accessible non-bone tumor lesion from which serial core biopsy specimen can be obtained; NOTE: if baseline biopsy is attempted and is unsuccessful (e.g., patient intolerance, inadequate tissue), the patient will still be considered eligible for the study; if core biopsy is not possible, other methods may be approved in advance by the protocol chair/designee Patient must have adequate tumor specimen available for submission Specimen Submission: Patients must have sufficient tissue available for the required biology study NOTE: Patient must meet all eligibility criteria outlined in pre-registration; patient may not be randomized until site has been notified that the central determination of p53 mutation status of the surgical tumor tissue has been completed and site has been notified of assay completion Patients must have archived tumor tissue from prior tumor biopsy or surgical resections available for submission that is sufficient to complete molecular profiling Submission of tumor tissue is required for all patients; investigators should check with their site pathology department regarding release of biospecimens before approaching patients about participation in the trial Submission of tumor tissue is required for all patients; investigators should check with their site pathology department regarding release of biospecimens before approaching patients about participation in the trial Must have a tumor lesion safely accessible for biopsy per the investigators discretion; while a soft tissue metastasis is preferred for a biopsy, a bone metastasis is allowed for biopsy as long as enough cores can be obtained; a biopsied lesion cannot be used for target lesion for response assessment Tissue available from primary and/or recurrent disease to evaluate tumor expression of NY-ESO-1 or PDL1 by immunohistochemistry (IHC) and/or reverse transcriptase-polymerase chain reaction (RT-PCR), and for measurement of DNA methylation