Improve the error message when properties are of an invalid type

Try to make it clearer what the problem is, list the legal types for
properties, and add the relevant documentation URL.