reinstated _isinstance type checking for validation purposes