Fix `method_exist()` calls throwing `\TypeError` exceptions on non-string|object
Fix `method_exist()` calls throwing `\TypeError` exceptions on non-string|object

PHP 8 throws `\TypeError` and `\ValueError` exceptions in internal functions (including `method_exists()`) when it encounters an invalid value. For `method_exists`, it expects `string|object`.
See https://php.watch/versions/8.0/internal-function-exceptions

`Assert::methodExists()` and `Assert::methodNotExists()` are updated to make sure the provided argument is string|object before calling `method_exist()` to avoid PHP 8 `\TypeError` exceptions.

webmozart/assert