Check if the class of the target instance is the same as the class declaring the method to invoke and use a fallback if it is not