check if publish have valid type to prevent segfault
Merge pull request #93 from yast/improve_error_handling

check if publish have valid type to prevent segfault