Do not check for the type of certain instances but use try-except to check for attributes. Was broken due to datasource decorator. Fixes #342