def _normalize_extension(extension):
    """
    Simple function that takes a given extension string and ensures that it
    is lower case and contains the leading period e.g. ('.jpg')

    Parameters
    ----------
    extension : `str`
        The string extension.

    Returns
    -------
    norm_extension : `str`
        The normalized extension, lower case with '.' prefix.
    """
    if extension is None:
        return None
    elif extension[0] is not '.':
        extension = '.' + extension
    return extension.lower()
