use eval { $thing->isa($class) } instead of UNIVERSAL::isa($thing,$class)
eliminate "ref $thing eq 'PDL'" and UNIVERSAL::isa($thing,'PDL') in favor of
"eval { $thing->isa('PDL') } || undef $@"