import json


def load_json_or_none(file_path):
    """If there is a path, runs json.load and returns it. Else returns None.

    Args:
        file_path (str or None):
            File path to the json file to load.

    Returns:
        (dict or None):
            A dictionary loaded from a json file.
            or
            None
    """
    metadata_dict = None
    if file_path:
        # Load JSON file for metadata amendments.
        with open(file_path, 'r') as input_file:
            metadata_dict = json.load(input_file)
    return metadata_dict