For SVY-6995: Refactor dataprovider type; move code in property
type as much as possible

Re-added a type check that I think was removed by mistake in previous
commits.