Catch type errors and warn