CRM-13550 - API - Improve validation of options