it'd be much nicer if you defined a `check_source` (and `check_dataset`, etc. below) or even a generic `check_resource_type(thing, type)` (i agree it's a couple of lines, but it's repeated lots of times)