def is_fits(filename):
    """
    Checks if file is a FITS file based on extension

    Parameters
    ----------
    filename : str

    Returns
    -------
    flag : bool

    """
    flag = False
    if filename is not None:
        if filename.split('.')[-1].lower() in 'fits':
            flag = True
    return flag
