import imghdr


def check_image(file_path, content = None):
    """
    Tests the image data contained in the file named by filename, and returns a string describing the image type.
    :param file_path: filepath
    :return: image type str or None
    """
    return imghdr.what(file_path, content)