Check if the class implements the needed interface

Prior to the reflection of the class is a better practice to check if the class is the one we are looking for if it implements the needed interface, this way we prevent weird bugs that happen when you reflect to many unrelated classes like "doctrine/annotations" with "doctrine/orm"