Merge "[PS] Return earlier if the input is null for `matches`." into main