Show correct error for no default metadata

The user sees segfault without handling. This marely happens, but it is hard to find the cause once happens.

I struggled with this problem, then I wish help other developers.