• Because when you first run it, the table doesn't exist, so the if statement returns 'invalid object' in the background.

    The next time you run the whole statement, the table does exist because the first run created. As such no error message.