detect invalid types from clients and report it nicely