from pathlib import Path
import yaml


def yml_to_dict(yml_file_path):
    """Return the yaml file content as a dictionary
    """
    yml_path = Path(yml_file_path).resolve()

    if not yml_path.is_file():
        return None

    yml_dict = None
    with open(yml_path, encoding='utf-8') as file:
        yml_dict = yaml.load(file, Loader=yaml.BaseLoader)

    return yml_dict