Add check for undeclared interface references

These also need to be type checked