Added better error reporting for type resolution errors #255