Fixed bug that wouldn't throw an error when checking for an unknown type