Added checks for invalid definitions / instructions