Fix related_type and related_id requirement.

If you specify related_type you need to specify related_id and vice-versa.

Without this change the handler gives a somewhat cryptic error message back.