from typing import Optional
from typing import Dict


def serialize_license(license) -> Optional[Dict[str, str]]:
    """ Serializes a License instance into a dict
    """
    if license:
        return {
            "url": license.url,
            "title": license.title
        }

    return None