The IsNothing function will only work if a row has been returned. Your problem is that there is nothing to return (and therefore nothing for the function to work on).
You could use a stored procedure that does something like
IF EXISTS (select * from table3)
SELECT id, datum FROM table3
ELSE
SELECT '' as id, '' as datum
Note the lack of a table in the ELSE statement - just return blanks for each of the columns you were expecting had there been data to return.
Seems a bit of a strange requirement though - if the header is being displayed then surely that is enough to display the "structure"