def hdf_is_open(fid):
    """ Is an HDF file open via fid """
    try:
        status = fid.id.valid
    except AttributeError:
        status = fid.fid.valid
    if status == 0:
        return False
    elif status == 1:
        return True
    else:
        return None
