fixes #2179 - validate the owner type, preventing the API returning errors for a wrong owner_type