Add assertion for undefined type in a relationship
Fix missing trailing semicolon