Improve handling of values with multiple allowed types