add search value constraints for param and return types, for #327