using isInstanceOf to check of Repository classes