def detect_image_mimetype(image):
    """
    A method to detect image type. It checks image header from raw data,
    returns content type.
    It handles PNG, JPEG, GIF, returns null string in case type is unknown.
    
    :param image: Image raw data to detect type.
    """
    if image[1:4] == 'PNG': return 'image/png'
    if image[0:3] == 'GIF': return 'image/gif'
    if image[6:10] == 'JFIF': return 'image/jpeg'
    return ''