Give the namespaces section a read here: https://roots.io/upping-php-requirements-in-your-wordpress-themes-and-plugins/
But I would assume that since you are in a file with a namespace declared, you probably have to use the class_exists function like this: if (class_exists('\\MultiPostThumbnails')) {
Basically, it’s probably checking if the class exists in the current namespace, but adding \
to any class makes it look in the global namespace.