implement constraints for any, string, number