Check if class exists before instantiating the class in Resources. Fixes #183
When an array is passed to Util::isObjectOrArray check each item