from pathlib import Path


def check_file_paths(file_path):
    """
    check if specified input file exists, raises Exception if not
    :param file_path: absolute or relative path
    :return: path object if file exists
    """
    if file_path is None:
        return file_path
    else:
        my_path = Path(file_path)
        if my_path.is_file():
            return my_path
        else:
            raise FileNotFoundError('There is no file ', file_path)