Fix checking of type names

Fix #34