Fixed a bug where the type checker would crash