[#228] Makes the type attribute required

Also fixes tests and adds some should fail tests