better validation of yamj api calls